MyBB Community Forums

Full Version: How do I hide a group from "who's online"?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I don't want the spiders/bots to apear in the "Who's Online" stat so I created a group for them. Now, how can I hide the full group members from the "Who's Online"?
btw, I used the guest group permissions as a template for this one and removed any posting permissions (left only the viewing ones).


Thanks,
Ori...
Hi all,
Isn't this possible? As I wrote, I don't want the spiders/bots to appear, so I created a special group for them and I want this group to be "hidden" (mostly from the "Who's Online").

Ori...
If you don't want the bots to show up in the Who's Online List, you can open the index.php in the MyBB root folder and comment an if block of the Who's Online Generator:

elseif(my_strpos($user['sid'], "bot=") !== false && $spiders[$botkey])
{
	// The user is a search bot.
	$onlinemembers .= $comma.format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']);
	$comma = ", ";
	++$botcount;
}

This is in line 108, if you comment the line starting with $onlinemembers and the line with $comma, they will most likely not be shown.

Result:
elseif(my_strpos($user['sid'], "bot=") !== false && $spiders[$botkey])
{
	// The user is a search bot.
	//$onlinemembers .= $comma.format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']);
	//$comma = ", ";
	++$botcount; // Leave this, in case you still want to count them
}
Thanks, this is a way I didn't think of. But, I would like to know if there's a way for a group to be hidden as this is sometimes necessary.

Ori...
(2009-01-23, 10:34 PM)okitai Wrote: [ -> ]Thanks, this is a way I didn't think of. But, I would like to know if there's a way for a group to be hidden as this is sometimes necessary.

Ori...

I've answered your question here:
How to add a custom location to Who's Online List? - Comprehensive Tutorial

[Image: LoveMyBB-en.png] - nice image... MyBB addicted huh? Toungue
דרך אגב, גם אני מישראל... אם אתה צריך עזרה - בכיף
What do you mean "comment".
I dont get it.
In PHP, to comment something, there's two types - // and /*. If you wrap something in /* and after it put */, it will "hide it" but not delete the code. And if you put // before a SINGLE line of code, it will stop that code from executing it.