Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-24-2008, 12:08 PM
masons_mum masons_mum is offline
 
Join Date: Aug 2008
Location: Where the haggis run free
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default show usercount in nav bar, how?

I have a custom page that my chatroom is on. I would like to have it so that it shows the number of users browsing the chatroom page in the nav bar...like this:

Chatroom (2)

Does anyone know how i can do this?
Reply With Quote
  #2  
Old 09-24-2008, 03:41 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You should ask this in the modification thread since they know the database structure for the chatroom and know what query to make.
Reply With Quote
  #3  
Old 09-25-2008, 10:15 AM
masons_mum masons_mum is offline
 
Join Date: Aug 2008
Location: Where the haggis run free
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ah i dont have a chatroom on my server, because i found no matter what chatroom modification i added, it kept hanging if any more than 4 users joined it. The chatroom is a big feature on my site. So basically i have a free hosted chatbox, from xat.com on a custom page, and so its how to add the amount of users browsing that page that i need to know.
Reply With Quote
  #4  
Old 09-25-2008, 02:36 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by masons_mum View Post
ah i dont have a chatroom on my server, because i found no matter what chatroom modification i added, it kept hanging if any more than 4 users joined it. The chatroom is a big feature on my site. So basically i have a free hosted chatbox, from xat.com on a custom page, and so its how to add the amount of users browsing that page that i need to know.
There is no way for us to just guess how to write a query to grab the number of users when we have no idea how that chatbox works.
Reply With Quote
  #5  
Old 09-25-2008, 06:58 PM
masons_mum masons_mum is offline
 
Join Date: Aug 2008
Location: Where the haggis run free
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its not to show whom is in the chatroom, its to show the count of whom is browsing the page itself that the chatroom is on.
Reply With Quote
  #6  
Old 09-25-2008, 07:29 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, a good place to start for that would be to copy the code in the showthread.php page that grabs the users browsing the thread (or the forumdisplay.php page which does the same only for the forum). It starts around line 1728. If all you want is the number, you can probably simplify that quite a bit - like you won't need all the stuff to do with the forumdisplay_loggedinuser template. The query gets it's data from the session table, so you'll want to modify the query to grab just sessions where the user has that page in the location field. I'm terrible at writing queries to work on live sites where I can only try it on a test site so I won't try with this one. Perhaps you can do it or someone else will wander in and try.
Reply With Quote
  #7  
Old 09-25-2008, 09:28 PM
masons_mum masons_mum is offline
 
Join Date: Aug 2008
Location: Where the haggis run free
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

eek sounds complex! Mind you i like a challenge so may have a look myself. Thanks for taking the time to help me
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 07:59 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.04280 seconds
  • Memory Usage 2,216KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete