Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
Track 1 user Details »»
Track 1 user
Version: 1.00, by Zzed Zzed is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-06-2002 Last Update: Never Installs: 4
 
No support by the author.

This hack allows you to track a single user with frequent updates set at 5
second intervals. This hack was originally requested by Riddel.

The hack is based on online.php. The way to call it is by passing it the
userid of the member you wish to track.

Like this: online.php?userid=####

Where #### is the userid of the member to track:

Example: online.php?userid=1 (If you want to track the site admin)

In online.php:

Look for the following code:
PHP Code:
 $allusers$DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, sessi\
on.host, user.showemail, user.receivepm
                              FROM session
                              "
iif($WOLguests" LEFT JOIN user USING (userid) "",user") ."
                              WHERE session.lastactivity > 
$datecut
                              "
iif(!$WOLguests" AND session.userid = user.userid""") ."
                              ORDER BY user.username
                              "
);

 
$moderators $DB_site->query("SELECT DISTINCT userid FROM moderator");
 while (
$mods $DB_site->fetch_array($moderators)) {
        
$mod[$mods[userid]] = 1;
 } 
And replace it with the following:
PHP Code:
if($userid)
{
unset(
$WOLrefresh);
    
$metarefresh "<META HTTP-EQUIV=\"refresh\" CONTENT=\"5; URL=online.php?userid=$userid\"> ";

 
$allusers$DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, sessi\
on.host, user.showemail, user.receivepm
                              FROM session
                              "
iif($WOLguests" LEFT JOIN user USING (userid) "",user") ."
                              WHERE session.lastactivity > 
$datecut
                              "
iif(!$WOLguests" AND session.userid = user.userid""") ."
                              AND user.userid = 
$userid
                              ORDER BY user.username
                              "
);
}
else{
 
$allusers$DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, sessi\
on.host, user.showemail, user.receivepm
                              FROM session
                              "
iif($WOLguests" LEFT JOIN user USING (userid) "",user") ."
                              WHERE session.lastactivity > 
$datecut
                              "
iif(!$WOLguests" AND session.userid = user.userid""") ."
                              ORDER BY user.username
                              "
);

 
$moderators $DB_site->query("SELECT DISTINCT userid FROM moderator");
 while (
$mods $DB_site->fetch_array($moderators)) {
        
$mod[$mods[userid]] = 1;
 }

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-07-2002, 07:04 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Screenshots or anything if available? I can't see the purpose of this..why track a single user when Who's Online tracks all online users. :?
Reply With Quote
  #3  
Old 04-07-2002, 07:54 PM
Zzed's Avatar
Zzed Zzed is offline
 
Join Date: Feb 2002
Location: Glendale, CA, USA
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had a typo in my original post. I was pointing to the wrong URL in my META tag. Sorry.

Velocd, when you have too many users online, it becomes a little botersome to scroll down to a particular user and track them.

Here is a screenshot. I am tracking myself on my board.
Reply With Quote
  #4  
Old 04-07-2002, 08:40 PM
JulianD's Avatar
JulianD JulianD is offline
 
Join Date: Jan 2002
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Zzed. Very nice... I will not install it on my boards, since we don't have too much members online, but I am subscribing to the thread, I will probably need this in a future day.

Thanks for the great job
Reply With Quote
  #5  
Old 03-13-2003, 02:10 AM
wolfman wolfman is offline
 
Join Date: Aug 2002
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well the code got slightly mangled when you posted


PHP Code:
if($userid)
{
unset(
$WOLrefresh);
    
$metarefresh "<META HTTP-EQUIV=\"refresh\" CONTENT=\"5; URL=online.php?userid=$userid\"> ";

 
$allusers$DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, sessi\
on.host, user.showemail, user.receivepm
                              FROM session
                              "
iif($WOLguests" LEFT JOIN user USING (userid) "",user") ."
                              WHERE session.lastactivity > 
$datecut
                              "
iif(!$WOLguests" AND session.userid = user.userid""") ."
                              AND user.userid = 
$userid
                              ORDER BY user.username
                              "
);
}
else{
 
$allusers$DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, sessi\
on.host, user.showemail, user.receivepm
                              FROM session
                              "
iif($WOLguests" LEFT JOIN user USING (userid) "",user") ."
                              WHERE session.lastactivity > 
$datecut
                              "
iif(!$WOLguests" AND session.userid = user.userid""") ."
                              ORDER BY user.username
                              "
);

 
$moderators $DB_site->query("SELECT DISTINCT userid FROM moderator");
 while (
$mods $DB_site->fetch_array($moderators)) {
        
$mod[$mods[userid]] = 1;
 }

It should have looked like this


PHP Code:
if($userid)
{
unset(
$WOLrefresh);
    
$metarefresh "<META HTTP-EQUIV=\"refresh\" CONTENT=\"5; URL=online.php?userid=$userid\"> ";

 
$allusers$DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, session.host, user.showemail, user.receivepm
                              FROM session
                              "
iif($WOLguests" LEFT JOIN user USING (userid) "",user") ."
                              WHERE session.lastactivity > 
$datecut
                              "
iif(!$WOLguests" AND session.userid = user.userid""") ."
                              AND user.userid = 
$userid
                              ORDER BY user.username
                              "
);
}
else{
 
$allusers$DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.usergroupid, user.invisible, session.host, user.showemail, user.receivepm
                              FROM session
                              "
iif($WOLguests" LEFT JOIN user USING (userid) "",user") ."
                              WHERE session.lastactivity > 
$datecut
                              "
iif(!$WOLguests" AND session.userid = user.userid""") ."
                              ORDER BY user.username
                              "
);

 
$moderators $DB_site->query("SELECT DISTINCT userid FROM moderator");
 while (
$mods $DB_site->fetch_array($moderators)) {
        
$mod[$mods[userid]] = 1;
 }

Hopefully this time it wont get mangled, but the hack works great I had no problems installing it on vb 2.3.0 rc1
Reply With Quote
  #6  
Old 03-16-2003, 01:20 PM
Sho Sho is offline
 
Join Date: Nov 2001
Location: Berlin, Germany
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A real tracking solution would be nice. So it preserves the old action after refreshing itself - and only updates when there's something new. So after a few minutes and two dozen auto-refreshs, you'd have a list like this :

14:56: Looking at forum X
14:57: Creating new thread in forum X
15:02: Looking at new thread Y
15:03: Main Index

etc.
Reply With Quote
  #7  
Old 03-16-2003, 09:22 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please put the code for the hack in a TEXT file and attach it.

It allows people to download the code and store it.
Reply With Quote
Reply

Thread Tools

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 04:24 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05644 seconds
  • Memory Usage 2,306KB
  • Queries Executed 20 (?)
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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)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
  • (6)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_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