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

Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2006, 07:38 AM
punk23 punk23 is offline
 
Join Date: Sep 2005
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Who's Online??

Hi there,

I am trying to get my current users (guests, members and spiders) "on-site" (name and amount) to show in a side bar...but with no luck.

Can anyone please tell me the easiest way to display this info on a 3.5.4 board.

Thanks.
Reply With Quote
  #2  
Old 07-10-2006, 08:08 AM
punk23 punk23 is offline
 
Join Date: Sep 2005
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi again,

Is this even possible? With 21 views and no replies I'm beginning to think that it isn't

Thanks.
Reply With Quote
  #3  
Old 07-10-2006, 09:45 AM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It helps if you put the URL to your forums in your profile then we can see what we are working with.

Also, please provide information relating to if the sidebar is on all pages or just one or two, which sidebar modification you are using (if it is from here or custom), and anything else that may be useful (including a link to the style on your site which you are wanting to apply this to).

As a general rule, the more information that you provide, the more chance you have of someone filling your request.
Reply With Quote
  #4  
Old 07-10-2006, 03:27 PM
punk23 punk23 is offline
 
Join Date: Sep 2005
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Unfortunately the forum in still under contruction (I will be moving my large and live site there next week)...so I don't want to give out the URL. The sidebar is custom work and is on all pages. I was wondering if there is a standard bit of code that I can place within the code of the bar to display the details as above.

My designer tried a plugin but it isn't pulling the required info into the sidebar;

PHP Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<plugins>
    <plugin active="1" product="vbulletin">
        <title>Forum Stats, Total Online, Get Newest Member Name</title>
        <hookname>global_start</hookname>
        <phpcode><![CDATA[// forum stats start  
$numbersmembers = $db->query_first("SELECT COUNT(*) AS users,MAX(userid) AS max FROM " . TABLE_PREFIX . "user");  
$numbermembers = number_format($numbersmembers['users']);  
$counter = $db->query_first("SELECT COUNT(postid) AS posts, COUNT(threadid) AS threads FROM " . TABLE_PREFIX . "post"); 
$totalposts=number_format($counter['posts']);  
$countthreads = $db->query_first("SELECT COUNT(*) AS threads FROM " . TABLE_PREFIX . "thread"); 
$totalthreads=number_format($countthreads['threads']);  
// forum stats end  

// total online start  
$datecut = TIMENOW - $vbulletin->options['cookietimeout'];  
$headerguests=$db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "session WHERE userid=0 AND lastactivity>$datecut");  
$headerusers=$db->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;  
// total online end 

// get newest member name and userid start  
$getnewestmember=$db->query_first("SELECT userid, username FROM " . TABLE_PREFIX . "user WHERE " . TABLE_PREFIX . "userid=$numbersmembers[max]");  
$newusername = $getnewestmember['username'];  
$newuserid = $getnewestmember['userid'];  
// get newest member name and userid end]]></phpcode>
    </plugin>
</plugins>
It shows the total number of posts, threads and members but doesn't pull thru anything about the users online
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 10:23 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.04529 seconds
  • Memory Usage 2,195KB
  • 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_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)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