vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   show usercount in nav bar, how? (https://vborg.vbsupport.ru/showthread.php?t=191761)

masons_mum 09-24-2008 12:08 PM

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?

Lynne 09-24-2008 03:41 PM

You should ask this in the modification thread since they know the database structure for the chatroom and know what query to make.

masons_mum 09-25-2008 10:15 AM

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.

Lynne 09-25-2008 02:36 PM

Quote:

Originally Posted by masons_mum (Post 1629928)
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.

masons_mum 09-25-2008 06:58 PM

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. :)

Lynne 09-25-2008 07:29 PM

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.

masons_mum 09-25-2008 09:28 PM

eek sounds complex! Mind you i like a challenge so may have a look myself. Thanks for taking the time to help me :)


All times are GMT. The time now is 04:38 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.01276 seconds
  • Memory Usage 1,717KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete