I have updated the admin function for "Who's Where". The original was not at all accurate and never logged a lot of pages. Ive updated this so you will know where your users are as long as their active so you can better optimize concentrated pages or monitor user trend across your site.
Open /backend/functions.php and find:
Replace entire function block with this:
Open /backend/functions.php and find:
function where($scriptname = "index", $userid, $update=1){
...
}Replace entire function block with this:
function where($scriptname = "index", $userid, $update=1){
if (!is_valid_id($userid))
die;
if (preg_match("/torrents-details.php/i", $scriptname))
$where = "Browsing Torrent Details (ID $_GET[id])";
elseif (preg_match("/torrents.php/i", $scriptname))
$where = "Browsing Torrents";
elseif (preg_match("/account-details.php/i", $scriptname))
$where = "Browsing Account Details (ID $_GET[id])";
elseif (preg_match("/torrents-upload.php/i", $scriptname))
$where = "Uploading Torrent";
elseif (preg_match("/account.php/i", $scriptname))
$where = "Browsing User Control Panel";
elseif (preg_match("/torrents-search/i", $scriptname))
$where = "Searching For Torrents";
elseif (preg_match("/forums.php/i", $scriptname))
$where = "Viewing Forums";
elseif (preg_match("/index/i", $scriptname))
$where = "Browsing Homepage";
elseif (preg_match("/mailbox.php/i", $scriptname))
$where = "Viewing Messages";
elseif (preg_match("/comments.php/i", $scriptname))
$where = "Viewing Comments";
elseif (preg_match("/account-recover.php/i", $scriptname))
$where = "Recovering Account";
elseif (preg_match("/bookmarks.php/i", $scriptname))
$where = "Viewing Bookmarks";
elseif (preg_match("/download.php/i", $scriptname))
$where = "Downloaded Torrent (ID $_GET[id])";
elseif (preg_match("/faq.php/i", $scriptname))
$where = "Reading FAQ Page";
elseif (preg_match("/friends.php/i", $scriptname))
$where = "Viewing Friends";
elseif (preg_match("/admincp.php/i", $scriptname))
$where = "Managing Admin Panel"; // Fixes the "Unknown Location" for Admin when viewing Who's Where
else
$where = "Unknown Location";
if ($update) {
$query = sprintf("UPDATE users SET page=".sqlesc($where)." WHERE id ='%s'", mysql_real_escape_string($userid));
$result = SQL_Query_exec($query);
}
return $where;
}

