Results 1 to 15 of 55
Page 1 of 4
FirstFirst 1 2 3 ... LastLast

Thread: [Release VB2] Total Thread Views

  1. #1
    Senior Member SystemLogic is on a distinguished road
    Join Date
    Jan 2001
    Location
    University Of Maryland
    Age
    27
    Posts
    119
    This hack was done by Kier, just wanted to post it in its own thread

    What It Does

    Counts all the views for each thread and adds them together. Basically a sum of the pageviews for all of your threads.

    How To Implement This

    Copy and paste this code into index.php in the regular forum directory.

    PHP Code:
    // Total Thread Views

    $boardviews $DB_site->query_first("
        SELECT SUM(views) AS threadviews FROM thread"
    );
    $totalviews number_format($boardviews[threadviews]); 
    Then just print $totalviews anywhere you want.

    Example: http://www.systemlogic.net/boards on the top left next to the number of posts/threads stats.
    SLCentral.com - Your logical choice for computing and technology
    SLBoards - The SLCentral.com message boards. Come join our community!
     

  2. #2
    Member bokhalifa is on a distinguished road bokhalifa's Avatar
    Join Date
    Feb 2001
    Location
    u a e dubai
    Age
    33
    Posts
    99
    good hack min
    In Dubai every thing is different
     

  3. #3
    Senior Member JJR512 is on a distinguished road JJR512's Avatar
    Join Date
    Dec 2000
    Location
    Glen Burnie, MD, USA
    Age
    34
    Posts
    507
    This is a cool little hack, I've just implemented it with no problems other than my own stupidity (I forgot to upload the new index.php -- d'Oh!).

    Anyway, after I installed it and looked at it (I put the output on a new line under the thread and post counts), it occurred to me that if you've imported from UBB (as I have), this isn't really a true count. UBB doesn't keep track of thread views, so however many you had while using UBB don't count. Your actual number may be a little higher or much higher; there's no real way to know.

    This is not a criticism; I don't mean to rain on this parade. I'm just pointing it out, that's all.
    -Justin "JJR512" Rebbert
    JJR512.com: Chat about anything!
     

  4. #4
    vBulletin Team eva2000 is on a distinguished road eva2000's Avatar
    Join Date
    May 2000
    Location
    Brisbane, Australia
    Posts
    29,252
    nice
    _
    * Required server info for server performance issues here
    * Choosing right cpus for high concurrency vB servers

    => Xeon Nehalem-EP 55xx > Xeon 54xx harpertown > Xeon 53xx > Opteron
    => vB4 FAQ | vB 4 Features | vB4 Syle Info | Internet brand Message
    => IBxAnders vB4.0 Search & InnoDB | InnoDB conversion | Large forums drive configs!
     

  5. #5
    Senior Member SystemLogic is on a distinguished road
    Join Date
    Jan 2001
    Location
    University Of Maryland
    Age
    27
    Posts
    119
    Anyway, after I installed it and looked at it (I put the output on a new line under the thread and post counts), it occurred to me that if you've imported from UBB (as I have), this isn't really a true count. UBB doesn't keep track of thread views, so however many you had while using UBB don't count. Your actual number may be a little higher or much higher; there's no real way to know.
    Yup, you're right, but I guess it's a good thing if you're starting over or just starting up using VBulletin. If you're importing into VB from anything else like UBB, it won't convert the thread views.....Just thought it be cool to have for those that wanted it
    SLCentral.com - Your logical choice for computing and technology
    SLBoards - The SLCentral.com message boards. Come join our community!
     

  6. #6
    Senior Member The_Sisko is on a distinguished road The_Sisko's Avatar
    Join Date
    Jun 2000
    Location
    Hamburg, Germany
    Age
    31
    Posts
    382
    Good idea! Thx for repost it as a own thread.
    The Sisko
    SciFi-Forum.de
     

  7. #7
    New Member n3n is on a distinguished road
    Join Date
    Mar 2001
    Location
    Korea
    Age
    35
    Posts
    28
    great little hack!!
    I have added this feature on my forum ^_^
    thanks
     

  8. #8
    Senior Member TimberLand is on a distinguished road TimberLand's Avatar
    Join Date
    Feb 2001
    Location
    Indiana
    Age
    42
    Posts
    148
    As far as the ubb missing views, could you add a little saying as of May 7, 2001 or something like that. If so how would I do that?

    Dan
     

  9. #9
    Senior Member Sarge is on a distinguished road
    Join Date
    Oct 2000
    Posts
    282
    where do I insert this at?

    what line number?

    And what about adding "Thread views since""
    Like posted above

    Great idea.
     

  10. #10
    Senior Member TimberLand is on a distinguished road TimberLand's Avatar
    Join Date
    Feb 2001
    Location
    Indiana
    Age
    42
    Posts
    148

    Who Knows

    That was just an idea I had. I would like to know as well. Any hackers interested.
     

  11. #11
    Senior Member Sarge is on a distinguished road
    Join Date
    Oct 2000
    Posts
    282
    easy dude

    Just insert

    $totalviews since 1-5-01 into where you want it on your forum home template
     

  12. #12
    Senior Member JJR512 is on a distinguished road JJR512's Avatar
    Join Date
    Dec 2000
    Location
    Glen Burnie, MD, USA
    Age
    34
    Posts
    507
    Well, it's very simple. Where ever you stick the $totalviews, just put the text by that. For example, if you put it in your forumhome template, so it's below your total threads and total posts, as I did, like this:
    Code:
    <b>$totalviews</b> total thread views
    You could just change it to this:
    Code:
    <b>$totalviews</b> total thread views since May 7, 2001
    (Or use whatever date it was when you converted from UBB to vB.)
    -Justin "JJR512" Rebbert
    JJR512.com: Chat about anything!
     

  13. #13
    Senior Member TimberLand is on a distinguished road TimberLand's Avatar
    Join Date
    Feb 2001
    Location
    Indiana
    Age
    42
    Posts
    148
    Where do you paste the code at, in the index.php? Anywhere special.

    Can someone give an example of placement.

    Thanks
    Dan
     

  14. #14
    Senior Member Sarge is on a distinguished road
    Join Date
    Oct 2000
    Posts
    282
    in the forum home template


    Put it under launch buddy list or wherever
     

  15. #15
    Senior Member JJR512 is on a distinguished road JJR512's Avatar
    Join Date
    Dec 2000
    Location
    Glen Burnie, MD, USA
    Age
    34
    Posts
    507
    Originally posted by JJR512
    Well, it's very simple. Where ever you stick the $totalviews, just put the text by that. For example, if you put it in your forumhome template, so it's below your total threads and total posts, as I did, like this:
    Code:
    <b>$totalviews</b> total thread views
    You could just change it to this:
    Code:
    <b>$totalviews</b> total thread views since May 7, 2001
    (Or use whatever date it was when you converted from UBB to vB.)
    -Justin "JJR512" Rebbert
    JJR512.com: Chat about anything!
     

Page 1 of 4
FirstFirst 1 2 3 ... LastLast

Similar Threads

  1. Total views in a forum?
    By shanx24 in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 0
    Last Post: Fri 16th Apr '04, 1:34am
  2. How do I see total thread views and other stats?
    By pelicanparts in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 3
    Last Post: Fri 27th Dec '02, 7:24am
  3. query to find out total number of thread views?
    By Jake Bunce in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 2
    Last Post: Thu 7th Mar '02, 8:34pm
  4. [RELEASE vB2.02beta] Bargraph thread rating
    By JWS in forum Releases: Version 2.x
    Replies: 8
    Last Post: Sun 5th Aug '01, 2:20pm
  5. Replies: 12
    Last Post: Wed 1st Aug '01, 5:39am

Bookmarks

Posting Permissions

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts