Announcement

Collapse
No announcement yet.

[release a minihack---personal glamour for vb2]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by ShadowTech
    I just thought I would point out that this hack has nothing to do with how active a member is on your forum.

    ALL it does is shows how many times ANYONE has viewed a users thread. Not how many threads that user themselves have viewed.

    If you want to see it in action to find out how it really works, open up a thread to view the posts.. look at the number of views for the thread creator.. then hit reload.. their number increases by one. Keep hitting reload and their number keeps rising.

    So if you are using this hack thinking it shows how frequently your user is surfing around the board looking at people's posts.. you are mistaken.
    I don't think you had read this hack.
    $personal= 2*$userinfo[posts]+$personal0[personalviews];

    Comment


    • #32
      Originally posted by ztsky


      I don't think you had read this hack.
      $personal= 2*$userinfo[posts]+$personal0[personalviews];
      this is the same exact code I edited in my .php files to install this hack and that is how it works on my board. Anyone who views the thread increases the thread starters' views count.

      Comment


      • #33
        Originally posted by ShadowTech


        this is the same exact code I edited in my .php files to install this hack and that is how it works on my board. Anyone who views the thread increases the thread starters' views count.
        Code:
        Anyone who views the thread increases the thread starters' views count.
        Do you think it not good to count as this?
        You can cancell this .
        just use:
        $personal= 2*$userinfo[posts]+$personal0

        Comment


        • #34
          I'm not saying it's a bad hack or anything.. just pointing out to those people who think this tracks a user's activity that it in fact doesn't with the default scripting.

          I am not too familiar with the code variables on this board.. but I don't doubt it would just take a simple change to track the actual user's specific views.

          Comment


          • #35
            Ztsky
            I have added this hack also which counts total page views for the entire board. You can see at the top of board at http://forums.realwebhost.net When I add the numbers from members from your personalpage view hack your number is around 300 views higher. How would I correct the total count in your hack to reduce the count by 300?

            http://vbulletin.com/forum/showthrea...5&pagenumber=1
            Real Web Host

            Comment


            • #36
              Originally posted by webhost
              Ztsky
              I have added this hack also which counts total page views for the entire board. You can see at the top of board at http://forums.realwebhost.net When I add the numbers from members from your personalpage view hack your number is around 300 views higher. How would I correct the total count in your hack to reduce the count by 300?

              http://vbulletin.com/forum/showthrea...5&pagenumber=1
              $personal= 3*$userinfo[posts]+2$personal0[personalviews];
              edit this code,you can figure your own,like:
              $personal= $userinfo[posts]+$personal0[personalviews];
              or:
              $personal= 1/2*$userinfo[posts]+$personal0[personalviews];

              Comment


              • #37
                member.php Where in here nothing matchs what you posted showthread below.

                Thanks Joey

                // Find out how much personal glamour does this user has
                $personal0 = $DB_site->query_first("
                SELECT SUM(views) AS personalviews FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'");
                $activity01= $userinfo[posts]-$starts;
                $activity02= $starts;
                $activity03= $personal0[personalviews];
                $personal= 3*$activity02+2*$activity01+$activity03;

                if ($personal2 == ""):
                $personal2 = "0";
                endif;
                // end Findhow much personal glamour

                showthread.php

                $onlinestatus="";
                }
                $personal0 = $DB_site->query_first("

                SELECT SUM(views) AS personalviews FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'");

                $personal= 2*$userinfo[posts]+$personal0[personalviews];

                if ($personal0 == ""):

                $personal0 = "0";

                endif;
                Real Web Host

                Comment


                • #38
                  Hi! webhost
                  1¡¢**********Edit member.php
                  **********FIND
                  Code:
                  eval("\$birthday = \"".gettemplat("getinfo_birthday")."\";"); 
                  }
                  **********AFTER THIS,ADD
                  Code:
                  $startcount = $DB_site->query_first("SELECT COUNT(title) AS starts FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'"); 
                  $starts = $startcount[starts]; 
                  if ($starts == ""): 
                  $starts = "0"; 
                  endif; 
                  $personal0 = $DB_site->query_first(" 
                  SELECT SUM(views) AS personalviews FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'"); 
                  $activity01= $userinfo[posts]-$starts; 
                  $activity02= $starts; 
                  $activity03= $personal0[personalviews]; 
                  $personal= 3*$activity02+2*$activity01+$activity03; 
                  if ($personal2 == ""): 
                  $personal2 = "0"; 
                  endif;

                  2¡¢*************editTemplate getinfo
                  *******FIND
                  Code:
                   <tr> 
                  <td bgcolor="#DFDFDF"><normalfont><b>Total Posts:</b></normalfont></td> 
                  <td bgcolor="#DFDFDF"><normalfont>$userinfo[posts] ($postsperday posts per day)</normalfont></td> 
                  </tr> 
                  <tr> 
                  <td bgcolor="#F1F1F1"><normalfont><b>Last Post:</b></normalfont></td> 
                  <td bgcolor="#F1F1F1"><normalfont>$lastpostdate $lastposttime<br><a href="$lastposturl">$lastposttitle</a>$nolastpost</normalfont></td> 
                  </tr>
                  ********AFTER THIS CODE,ADD:
                  Code:
                   <tr> 
                  <td bgcolor="#DFDFDF"><normalfont><b>Start Threads:</b></normalfont></td> 
                  <td bgcolor="#DFDFDF"><normalfont>$starts </normalfont></td> 
                  </tr> 
                  <tr> 
                  <td bgcolor="#F1F1F1"><normalfont><b>Personal Views:</b></normalfont></td> 
                  <td bgcolor="#F1F1F1"><normalfont><b>$personal </b></normalfont></td> 
                  </tr>
                  3¡¢**********Edit SHOWTHREAD.PHP
                  **********FIND
                  [CODE] //$post[message].=$post[signature]; [CODE]
                  **********AFTER THIS,ADD
                  Code:
                   // Find out how many threads this user has started 
                  $startcount = $DB_site->query_first("SELECT COUNT(title) AS starts FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'"); 
                  $starts = $startcount[starts]; 
                  if ($starts == ""): 
                  $starts = "0"; 
                  endif; 
                  $personal0 = $DB_site->query_first(" 
                  SELECT SUM(views) AS personalviews FROM thread WHERE postuserid='$userinfo[userid]' AND open!='10'"); 
                  $activity01= $userinfo[posts]-$starts; 
                  $activity02= $starts; 
                  $activity03= $personal0[personalviews]; 
                  $personal= 3*$activity02+2*$activity01+$activity03; 
                  if ($personal2 == ""): 
                  $personal2 = "0"; 
                  endif;
                  4¡¢**********Edit template POSTBIT
                  *********FIND:
                  Code:
                   <smallfont>Registered: $post[joindate]<br> 
                  Location: $post[field2]<br> 
                  Posts: $post[posts]</smallfont></td>
                  *******replace it with :
                  Code:
                   <smallfont>Registered: $post[joindate]<br> 
                  location: $post[field2]<br> 
                  posts: $post[posts]<br> 
                  personalviews:$personal </smallfont></td>

                  that's all.

                  Comment


                  • #39
                    ztsky

                    ok I reinstalled per your instructions above this is what I have.

                    Total page views of all members from your hack shows 9602.

                    My total views shows 9280 a difference of 322. So based on your script above what do I change to subract your count by 322 views?

                    Joey
                    Real Web Host

                    Comment


                    • #40
                      ztsky

                      I don't know how hard it would be for you to do but the best thing would to be somehow take your hack count numbers of personalpageviews and total them up. That way you could use that number for total views of the entire site instead of using the other hack for total views. That way they would always match.
                      Real Web Host

                      Comment


                      • #41
                        Originally posted by webhost
                        ztsky

                        I don't know how hard it would be for you to do but the best thing would to be somehow take your hack count numbers of personalpageviews and total them up. That way you could use that number for total views of the entire site instead of using the other hack for total views. That way they would always match.
                        I think you misunderstand this hack's function.

                        Comment


                        • #42
                          ok then so to get the numbers to match up, I need to change the numbers below.

                          PHP Code:
                          $personal3*$userinfo[posts]+2$personal0[personalviews]; 
                          edit this code,you can figure your own,like
                          $personal$userinfo[posts]+$personal0[personalviews]; 
                          or: 
                          $personal1/2*$userinfo[posts]+$personal0[personalviews]; 
                          Real Web Host

                          Comment


                          • #43
                            Originally posted by webhost
                            ok then so to get the numbers to match up, I need to change the numbers below.

                            PHP Code:
                            $personal3*$userinfo[posts]+2$personal0[personalviews]; 
                            edit this code,you can figure your own,like
                            $personal$userinfo[posts]+$personal0[personalviews]; 
                            or: 
                            $personal1/2*$userinfo[posts]+$personal0[personalviews]; 
                            the reason you are getting numbers that don't match is because of the "$personal= 2*$userinfo[posts]+$personal0[personalviews]; "

                            what it is doing is multiplying the number of posts a person has made .. and then adding it to the number of views their threads have had. So I think if you wanted to get the same number of views for your user totals and the board total.. you would change "$personal= 2*$userinfo[posts]+$personal0[personalviews]; " to "$personal= $personal0[personalviews]"

                            But, I am not a vB guru or anything.. just going by what I see in the code and applying some common sense,

                            Comment


                            • #44
                              thanks I will try it and see if it works?
                              Real Web Host

                              Comment


                              • #45
                                ztsky Help Please

                                Will you probably know by now how everything has chnaged with the new
                                version of vb 2.0.3, now alot of stuff got moved from the showthread.php file to the functions.php file.
                                Your hack still works in the member profile section but does not in the showthread page, text shows up personalviews but no data to the right of it. Can you tell me what I need to do to fix this.

                                Joey
                                Real Web Host

                                Comment

                                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                                Working...
                                X