Hi guys
I was wondering how to remove the banned members at the who's online list.
There are bunch of black names ( This is the color of the banned members ) in the who's online and it does not look good!
Well you could delete there account, but there is not any option (as I know of) that allows you to remove a group. You could make it refresh every 5 mins or so and once 5 mins is up there gone (due to not able to login)
(2014-07-03, 07:26 PM)Ace700 Wrote: [ -> ]Well you could delete there account, but there is not any option (as I know of) that allows you to remove a group. You could make it refresh every 5 mins or so and once 5 mins is up there gone (due to not able to login)
I want the black names removed from the who's online list and we had the who's online set to the past 120 minutes so I really want to remove the black names from who's online. Need core editing for that?
You'll need a core edit to do this.
On index.php find
$query = $db->query("
SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE s.time>'$timesearch'
ORDER BY u.username ASC, s.time DESC
");
Replace With:
$query = $db->query("
SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE s.time>'$timesearch' AND u.usergroup !=7
ORDER BY u.username ASC, s.time DESC
");
If your banned group is different than 7 put the gid of that group instead.
(2014-07-03, 09:19 PM)dragonexpert Wrote: [ -> ]You'll need a core edit to do this.
On index.php find
$query = $db->query("
SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE s.time>'$timesearch'
ORDER BY u.username ASC, s.time DESC
");
Replace With:
$query = $db->query("
SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup
FROM ".TABLE_PREFIX."sessions s
LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
WHERE s.time>'$timesearch' AND u.usergroup !=7
ORDER BY u.username ASC, s.time DESC
");
If your banned group is different than 7 put the gid of that group instead.
I cannot find any of this code.
Lines 192 - 199 in online.php.
(2014-07-04, 01:26 PM)Johnny S Wrote: [ -> ]Lines 192 - 199 in online.php.
Okay thanks. I have modified the code now. It does not take effect on the site. Do I need to clear my cache?
That only does it for viewing the Who's Online Page. On index.php it should be on line 65.
(2014-07-04, 06:07 PM)dragonexpert Wrote: [ -> ]That only does it for viewing the Who's Online Page. On index.php it should be on line 65.
Okay thanks. I'll check it out.
(2014-07-04, 06:07 PM)dragonexpert Wrote: [ -> ]That only does it for viewing the Who's Online Page. On index.php it should be on line 65.
That change also affects the guest count. I changed the index.php (not the online.php) to your code, and the banned users disappeared. However, it also set the guest count to "0 guests online", which cannot be true.