vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Statistics Modifications - Display Online Users Count Everywhere (vB 4) (https://vborg.vbsupport.ru/showthread.php?t=239363)

NeutralizeR 03-28-2010 10:00 PM

Display Online Users Count Everywhere (vB 4)
 
1 Attachment(s)
Description: This mod will add online users count info to any vBulletin page.

Example:
Quote:

23 Users Online (6 members and 17 guests)
Two small queries are executed, same with the Admin CP online users stat.

Details: You don't have to enable "Display Logged in Users?" options (forumhome,showthread,forumdisplay) which requires serious resources to run this mod. I haven't noticed any performance problems with more than 10k online users.

Screenshots:
https://vborg.vbsupport.ru/

http://img149.imageshack.us/img149/4370/snap2l.png
Installation:
1-) Import product-msx_online_count_vb3.xml
2-) Edit navbar template (or *any template you prefer) and add:
Code:

<!-- Display Online Users Count -->
<b>{vb:raw msxtotal}</b> users online ({vb:rawphrase x_members_and_y_guests, {vb:raw msxmembers}, {vb:raw msxguests}})
<!-- / Display Online Users Count -->

*If you want to add the HTML code to a different template than navbar template:
Edit Get Online Users Count plugin and change 'navbar' with the template name.

vBulletin 3.8.x version is here: https://vborg.vbsupport.ru/showthread.php?t=239361

Kolbi 03-29-2010 05:59 PM

I guess this could be very useful in some cases :)

NeutralizeR 03-29-2010 06:04 PM

Quote:

Originally Posted by Kolbi (Post 2012391)
I guess this could be very useful in some cases :)

Yes, it was really annoying to manually disable forumhome,showthread,forumdisplay online users stats each time at the peak times for me :)

ericgtr 03-29-2010 08:21 PM

Neat mod, I can't get it to work in the header after changing navbar to header in the plugin and putting the code in the header though. Works fine in the navbar but I would prefer to have it in the header.

NeutralizeR 03-29-2010 08:38 PM

Quote:

Originally Posted by ericgtr (Post 2012472)
Neat mod, I can't get it to work in the header after changing navbar to header in the plugin and putting the code in the header though. Works fine in the navbar but I would prefer to have it in the header.

Code:

vB_Template::preRegister('header',array('msxtotal' => $msxtotal, 'msxmembers' => $msxmembers, 'msxguests' => $msxguests));
I don't have vB4 installed, but i've just tested on my friends site and the code above is working.

ericgtr 03-29-2010 08:53 PM

Quote:

Originally Posted by NeutralizeR (Post 2012481)
Code:

vB_Template::preRegister('header',array('msxtotal' => $msxtotal, 'msxmembers' => $msxmembers, 'msxguests' => $msxguests));
I don't have vB4 installed, but i've just tested on my friends site and the code above is working.

That's what I have too but it won't work in the header. I have a feeling the hook location needs to be changed for the header, just not sure which one.

NeutralizeR 03-29-2010 09:16 PM

Weird. The site i tested is using vb 4.0.2 PL4 with vBSEO and no other mods installed. Any caching system etc enabled? Sorry for not being able to suggest solutions as i don't have vb4 :( How you tried any other templates?

Maybe another user installs this mod and tells us if it works for him in the header...

ericgtr 03-29-2010 09:46 PM

Quote:

Originally Posted by NeutralizeR (Post 2012496)
Weird. The site i tested is using vb 4.0.2 PL4 with vBSEO and no other mods installed. Any caching system etc enabled? Sorry for not being able to suggest solutions as i don't have vb4 :( How you tried any other templates?

Maybe another user installs this mod and tells us if it works for him in the header...

That's cool, I did try it in the navbar and can confirm it works fine there. :)

NeutralizeR 03-29-2010 09:47 PM

One last try... Add this code to the header template just before the last </div> to test...

Code:

<!-- Display Online Users Count -->
<b>{vb:var msxtotal}</b> users online ({vb:rawphrase x_members_and_y_guests, {vb:var msxmembers}, {vb:var msxguests}})
<!-- / Display Online Users Count -->


ericgtr 03-29-2010 09:54 PM

Quote:

Originally Posted by NeutralizeR (Post 2012511)
One last try... Add this code to the header template just before the last </div> to test...

Code:

<!-- Display Online Users Count -->
<b>{vb:var msxtotal}</b> users online ({vb:rawphrase x_members_and_y_guests, {vb:var msxmembers}, {vb:var msxguests}})
<!-- / Display Online Users Count -->


Still no luck.


All times are GMT. The time now is 03:18 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01135 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete