Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
"Users browsing this thread" Details »»
"Users browsing this thread"
Version: 1.00, by Admin (Coder) Admin is offline
Developer Last Online: Nov 2024 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-31-2002 Last Update: Never Installs: 78
 
No support by the author.

Here's what I did when I first written the hack for vB.org.
Since nakkid's query was wrong, I got permission from him to post my version.

Anyway, this is using vbHacker so you'll need that. See my signature for a link about that.

This hack adds a list of users currently browsing the thread you see. It requires another field in the user table and no new queries except for showthread.php. It's based of the "Users browsing forum" feature so it was easy.

Cheers.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 05-14-2002, 09:44 AM
Twin-x Twin-x is offline
 
Join Date: Nov 2001
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by tweak
Help i installed this Hack but it wont work. I checked all the code over and over its all there in the right spots But it wont show up on my forum??

The Code is in the templates and the created template is there.
the query is there.
I have the same problem. Nothing is showed.
Reply With Quote
  #53  
Old 05-14-2002, 10:28 PM
tweak's Avatar
tweak tweak is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
Is that not a screen shot of forumhome?
Ahhh Ya? Isn't that where it should be? Like this board?
Reply With Quote
  #54  
Old 05-15-2002, 04:26 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by tweak


Ahhh Ya? Isn't that where it should be? Like this board?
That's a different hack:

https://vborg.vbsupport.ru/showthrea...threadid=38012
Reply With Quote
  #55  
Old 05-15-2002, 05:01 AM
tweak's Avatar
tweak tweak is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OH SH*T Sorry guys ................. Thanx.
Reply With Quote
  #56  
Old 05-15-2002, 09:36 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL.
Reply With Quote
  #57  
Old 05-15-2002, 10:06 PM
tweak's Avatar
tweak tweak is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by FireFly
LOL.
LOL You would not believe how much this stressed me. Spent hour checking everything over and over .LOL I was like WTF am i missing. But hey this hack is install and working great now that i really know what it does. :surprised:
Reply With Quote
  #58  
Old 05-21-2002, 11:56 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working well on 2.2.5, thanks FireFly!
Reply With Quote
  #59  
Old 05-23-2002, 12:28 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

firefly, i installed your hack today. i was thinking of an interesting mod... to show the actual numbers of users viewing the thread in forumdisplay. here it is what i did...
in forumdisplay.php find:
Code:
updateuserforum($forumid);
replace it with:
Code:
updateuserforum($forumid,$threadid);
find:
Code:
    ORDER BY sticky DESC, $sortfield $sqlsortorder
    ");
BELOW this add::
Code:
// users browsing each thread
$getthreadbrowsers = $DB_site->query("SELECT COUNT(*) AS count,inthread
                                      FROM user
                                      WHERE lastactivity>".($ourtimenow - $cookietimeout)."
                                        AND lastvisit<>lastactivity
                                      GROUP BY inthread");
$threadbrowsers = array();
while ($threadbrowser = $DB_site->fetch_array($getthreadbrowsers)) {
	$threadbrowsers[$threadbrowser['inthread']] = $threadbrowser['count'];
}
find:
Code:
      $thread[votenum] = '0';
    } else {
BELOW this, add:
Code:
      global $threadbrowsers;
      $activebrowsers = $threadbrowsers[$forum['forumid']];
      if (intval($activebrowsers)<1) {
        $activebrowsers = 0;
      }
now.. there is something i miss, because it will not update the number of users viewing the thread. i also tried this...
find:
Code:
getforumrules($foruminfo,$getperms);
BELOW this, add:
Code:
updateuserforum($thread['forumid'], $thread['threadid']);
i think there is an unset somewhere that stop it from counting. can you let me know if the basic idea is ok and what steps i missed? thanks.
Reply With Quote
  #60  
Old 05-23-2002, 01:07 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just copying Chen's code from the forum viewers hack won't get you anywhere...

You can follow the same principle but theres an easier way
Reply With Quote
  #61  
Old 05-23-2002, 08:14 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what do you mean wont get me anywhhere? firefly knows is his code, i dont understand what do you reffer to it.
what's the best way PPN? should i do a count in the $browsers query?
Reply With Quote
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:39 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05386 seconds
  • Memory Usage 2,303KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete