View Full Version : Hide Admin/Mod Whos Online Location
Hi. Is there a way to hide the location of admin and mods in the whos online details box without making them invisible on the board? I want members to see that we're there and available... but I don't want our every move shown as to make anyone uncomfortable.
Maybe defaulting them to main page or unknown location.
Admin
10-10-2001, 05:52 AM
In online.php, replace this:
$userinfo[$key][location] = $user[location];
with this:
if ($user[usergroupid]==6 or $user[usergroupid]==5 or $user[usergroupid]==7)
$userinfo[$key][location] = '';
else
$userinfo[$key][location] = $user[location];
and replace this:
$allusers= $DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.invisible, session.host, user.showemail, user.receivepm
with this:
$allusers= $DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.invisible, session.host, user.showemail, user.receivepm, user.usergroupid
(yup, stupid php tag)
Hi... The second part of the code is a little different than what's on the online.php. I tried it anyway and got a database error...
The last part of the before and after replacement is different:
[&n]
[&nbs]
These are not at the end of the string of either original string.
Admin
10-10-2001, 08:37 AM
Guess the PHP tag screwed it a bit... :/
$allusers= $DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.invisible, session.host, user.showemail, user.receivepm
should be:
$allusers= $DB_site->query("SELECT user.username, session.location, session.lastactivity, user.userid, user.invisible, session.host, user.showemail, user.receivepm,user.usergroupid
Hi. Is there a way that I can get this hack so that it only hides the admin online? Thanks bunches.
change
if ($user[usergroupid]==6 or $user[usergroupid]==5 or $user[usergroupid]==7)
$userinfo[$key][location] = '';
else
$userinfo[$key][location] = $user[location];
to:
if ($user[usergroupid]==6) {
$userinfo[$key][location] = '';
} else {
$userinfo[$key][location] = $user[location]; }
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.