MyBB Community Forums

Full Version: Robots on Who's Online
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't want to display ANY robots on the 'Who's Online'.. This includes Yahoo! and Google.

I'd still like them to browse freely, just not display their names in that box. How can I get rid of their names?
Any reason you don't want them?
Open ./online.php and find and remove the following;
		// Otherwise this session is a bot
		else if(my_strpos($user['sid'], "bot=") !== false && $spiders[$botkey])
		{
			$user['bot'] = $spiders[$botkey]['name'];
			$user['usergroup'] = $spiders[$botkey]['usergroup'];
			$guests[] = $user;
		}

Within the same file, find;
	// Fetch spiders
	$spiders = $cache->read("spiders");
and remove.
Or just delete all the spiders from the ACP and save a code edit...
(2011-03-07, 09:56 AM)MattRogowski Wrote: [ -> ]Or just delete all the spiders from the ACP and save a code edit...

Will this still let them browse though?


@ 3 Above: I just want to remove them because I think that it makes the who's online box look really ugly, especially because they're not sorted in alphabetical order like all other names, they're the first ones.
(2011-03-07, 12:20 PM)Dialatic Wrote: [ -> ]
(2011-03-07, 09:56 AM)MattRogowski Wrote: [ -> ]Or just delete all the spiders from the ACP and save a code edit...

Will this still let them browse though?

Yes, all the spiders in that list do is detect when a visitor is a bot and shows them as such, it just matches the useragent string. If you delete those they'll just show as guests when they visit, it's not adding any code to physically stop them visiting.
(2011-03-07, 12:20 PM)Dialatic Wrote: [ -> ]@ 3 Above: I just want to remove them because I think that it makes the who's online box look really ugly, especially because they're not sorted in alphabetical order like all other names, they're the first ones.

Did my edits works for you ?
(2011-03-07, 12:24 PM)Yaldaram Wrote: [ -> ]
(2011-03-07, 12:20 PM)Dialatic Wrote: [ -> ]@ 3 Above: I just want to remove them because I think that it makes the who's online box look really ugly, especially because they're not sorted in alphabetical order like all other names, they're the first ones.

Did my edits works for you ?

About to try them. By the way, I PMed you on your site. Add me on MSN please, [email protected].
(2011-03-07, 12:24 PM)MattRogowski Wrote: [ -> ]
(2011-03-07, 12:20 PM)Dialatic Wrote: [ -> ]
(2011-03-07, 09:56 AM)MattRogowski Wrote: [ -> ]Or just delete all the spiders from the ACP and save a code edit...

Will this still let them browse though?

Yes, all the spiders in that list do is detect when a visitor is a bot and shows them as such, it just matches the useragent string. If you delete those they'll just show as guests when they visit, it's not adding any code to physically stop them visiting.

Never mind Yalda, this solution is much more simple. Thanks Matt!

Thank you both for the help though.