Zzed
04-06-2002, 10:00 PM
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:
$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:
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;
}
}
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:
$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:
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;
}
}