Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Total Number of Users Online Now on Every Page Details »»
Total Number of Users Online Now on Every Page
Version: 1.00, by Erwin Erwin is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-04-2004 Last Update: Never Installs: 29
 
No support by the author.

Again, all credit goes to Chen for the original hack.

I've merely modified it, so that two extra queries are saved on forumhome - there's no point running the queries again since index.php has already calculated it.

This hack modifies 1 php file and 2 templates. It's easy.

Using my method, you save yourself 2 queries on forumhome. We use this at vB.org too.

Instructions in the HTML file zipped below.

Show Your Support

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

Comments
  #22  
Old 03-28-2004, 08:47 PM
brandy's Avatar
brandy brandy is offline
 
Join Date: Mar 2004
Location: Florida
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My problem was fixed. I had my own variable named "$header" and this hack uses that variable name. I needed to change my variable to a different name.
Now it works, thanks!
Brandy
Reply With Quote
  #23  
Old 03-29-2004, 04:19 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As far as I'm aware I had it where the instructions stated... If I remember rightly above the call of the navbar template.

I did also put it in the php include template (at the top) with my existing code below it, my existing code in that template is:

Code:
// Example of how to include a seperate file:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();

ob_start();
include("/data/docs/racesimcentral.com/docs/forum/banner.php");
$rsc_bannrz = ob_get_contents();
ob_end_clean();

ob_start();
include("/data/docs/racesimcentral.com/docs/forum/logos.php");
$rsc_logoz = ob_get_contents();
ob_end_clean();
Reply With Quote
  #24  
Old 03-29-2004, 05:16 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got it! There is a line break in the code to be inserted due to your html file, I do run 1280.1024 but still missed it.
Reply With Quote
  #25  
Old 04-03-2004, 01:21 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed without a hitch
Reply With Quote
  #26  
Old 04-05-2004, 12:56 AM
calvinnguyen calvinnguyen is offline
 
Join Date: Nov 2003
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found out at your hack have error for this one:

'forumhome_subforumseparator_post'
);

Replace with:
'forumhome_subforumseparator_post',
'header'
);

The correct one should be this:
'forumhome_subforumseparator_post',
'header',
);
Reply With Quote
  #27  
Old 09-29-2004, 04:45 AM
ChrisLM2001 ChrisLM2001 is offline
 
Join Date: May 2003
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have a question: In #3 of the instructions it says to edit the header. Do you copy the header_include code and insert in there (and where)?

Thanks!

Chris
Reply With Quote
  #28  
Old 10-08-2004, 06:02 PM
enginethatcan't enginethatcan't is offline
 
Join Date: Jul 2003
Location: MA
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The number isn't showing up, why?
Reply With Quote
  #29  
Old 10-08-2004, 06:04 PM
enginethatcan't enginethatcan't is offline
 
Join Date: Jul 2003
Location: MA
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nevermind -- forgot to upload the index.php file lol
Reply With Quote
  #30  
Old 12-01-2004, 02:06 AM
ChrisLM2001 ChrisLM2001 is offline
 
Join Date: May 2003
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mr. Brian
Yes. No doubt!

BTW, I noticed whenever I'm trying to check/repair my db, I got this line:-

[code]soccerwi_soccerforum.soccerwi_soccerforumsession
error : The handler for the table doesn't support check[/b]

Any ideal why I got this?

thanks
If you're using a prefix, this the header template code to use (vB 3.0.3).....

PHP Code:
if (strpos($_SERVER['PHP_SELF'], 'index.php') == false) { 
$datecut TIMENOW $vboptions['cookietimeout']; 
$headerguests=$DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "session WHERE " TABLE_PREFIX "session.userid=0 AND " TABLE_PREFIX "session.lastactivity>$datecut"); 
$headerusers=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM " TABLE_PREFIX "session WHERE " TABLE_PREFIX "session.userid>0 AND " TABLE_PREFIX "session.lastactivity>$datecut"); 
$headerguests=$headerguests[count]; 
$headerusers=$headerusers[count]; 
$totalonline=$headerguests+$headerusers

Chris
Reply With Quote
  #31  
Old 01-06-2005, 01:10 AM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

first off, this hack rocks. it's perfectly elegant.

i've updated to 3.04 and it works fine. it also works on my vba cmps pages, but i think that may have to do with some of the other modules on it.

however, i just uploaded the vba links directory hack. the links.php or main page resides in a subforum called links. for the life of me, i cannot get the number of online users to show up on the links.php page.

help!! this makes my forum look totally non-uniform. i've already had to input $vboptions[bburl] (or something like that in front of every link because of the subforum issue.

is there anything that can be done to make this hack work on subforum pages as well?

-yinyang
Reply With Quote
Reply


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 02:03 PM.


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.13822 seconds
  • Memory Usage 2,313KB
  • 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
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)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
  • (3)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