PDA

View Full Version : Hide Admin/Mod Whos Online Location


Diva
10-10-2001, 04:42 AM
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)

Diva
10-10-2001, 08:35 AM
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

Diva
02-16-2003, 08:46 PM
Hi. Is there a way that I can get this hack so that it only hides the admin online? Thanks bunches.

Bane
02-17-2003, 07:54 PM
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]; }