vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Who's Online In Admin CP (https://vborg.vbsupport.ru/showthread.php?t=43060)

NTLDR 08-22-2003 07:39 PM

Try this one, its totally untested as I don't use vBulletin 2 anymore, should show the IP address and includes the location fix :)

Just replace the code with whats in this text file, if anyone confirms it works then I'll update the first post.

*heh* I just looked bellow and it looks like mccollin has posted almost the same code :D

mccollin 08-22-2003 08:06 PM

I said I wasn't going to post the other code, but this is cool... I replaced the "guest" with the ip address, and sorted by it. Each ip address is a hotlink to samspade.com to get the host info.

PHP Code:

$datecut time()-$cookietimeout;

$onlineusers mysql_query("SELECT DISTINCT username,location,session.lastactivity,usergroupid FROM user,session WHERE session.userid=user.userid AND session.lastactivity>$datecut ORDER BY username ASC");
           echo 
"<br><br><table width=\"90%\" align=\"center\" border='0' cellpadding='0' cellspacing='0' class='tblborder'><tr><td>";
           echo 
"<table width=\"100%\" border=0 cellspacing=1 cellpadding=4><tr class='tblhead'><td align=\"center\" colspan=4 width=\"100%\"><b><span class='tblhead'>Who's Online</span></b></td></tr>\n";
    echo 
"<tr class='".getrowbg()."'><td nowrap align=\"center\"><font size='1'><b>Username</b></font></td><td align=\"center\" nowrap><font size='1'><b>Location</b></font></td><td align=\"center\" nowrap><font size='1'><b>Last Active</b></font></td></tr>\n";
        while (
$online=$DB_site->fetch_array($onlineusers)) {       
        if (!
$online[location]) {
        
$online[location] = "Control Panel";
       }
        if (
$online['usergroupid'] == 6) {
       
$username "<b><i>$online[username]</i></b>";
       } else if (
$online['usergroupid'] == 5) {
           
$uusername "<b>$user[username]</b></font>";
       } else {
        
$username $online[username];
        }
        
$lastactivity=vbdate($timeformat,$online[lastactivity]);
        echo 
"<tr class='".getrowbg()."'><td nowrap><a href=\"../member.php?s=$session[sessionhash]&action=getinfo&username=$online[username]\" target=_blank>$username</a></td><td nowrap>$online[location]</td><td nowrap>$lastactivity</td></tr>";
    }
$onlineguests mysql_query("SELECT DISTINCT location,lastactivity, host FROM session WHERE userid=0 AND session.lastactivity>$datecut ORDER BY host ASC");
        while (
$onlineg=$DB_site->fetch_array($onlineguests)) {       
        
$lastguestactivity=vbdate($timeformat,$onlineg[lastactivity]);
        echo 
"<tr class='".getrowbg()."'><td nowrap><a href=\"http://www.samspade.org/t/ipwhois?a=$onlineg[host]\" target=_blank>$onlineg[host]</a></td><td nowrap>$onlineg[location]</td><td nowrap>$lastguestactivity</td></tr>";
    }
echo 
"</table></td></tr></table>"


FWF 08-30-2003 07:47 AM

this is very cool im going to use it.

manning 04-05-2007 03:50 AM

Is something like this available for the latest version of vb?

manning 04-16-2007 08:46 PM

nothing?


All times are GMT. The time now is 11:30 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.01817 seconds
  • Memory Usage 1,745KB
  • 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_php_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
  • (5)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