Hiding search bots from "WHO IS ONLINE"

For support and discussion related to templates, themes, and imagesets in phpBB 3.1.
Get Involved
nitram12345
Registered User
Posts: 2
Joined: Thu Nov 20, 2014 9:42 am

Hiding search bots from "WHO IS ONLINE"

Post by nitram12345 »

I want to hide the search bots from "WHO IS ONLINE". The reason for this is that in my forum, showing them there serves no purpose and it makes it harder to see what actual humans are online (which is more interesting to us in the forum). The forum always has at least 6 search bots crawling it but normally just 2-3 real users so the UI becomes a bit cluttered.

I've tried to figure out myself how to hide the bots but I can't find a good place in the code or in the styles to accomplish this. Here's an example:

Baidu [Spider], Bing [Bot], Google Adsense [Bot], Google [Bot], mmm, sss, Yahoo [Bot]

I just want to show mmm and sss, not the 5 bots.

Can anyone give a suggestion?
User avatar
Talk19Zehn
Registered User
Posts: 809
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Hiding search bots from "WHO IS ONLINE"

Post by Talk19Zehn »

Hi, ACP / USERS and GROUPS / GROUPS --> Manage Groups --> Bots --> Settings:

example:
  • Display group in legend: no catch
Remember that you can also control the presence via ACP, if necessary.
Make sure that bots do not have access rights to the forums, if necessary also.
Create a robots.txt and protect directories (!).

Best regards
User avatar
KevC
Support Team Member
Support Team Member
Posts: 71738
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Hiding search bots from "WHO IS ONLINE"

Post by KevC »

Talk19Zehn wrote:Hi, ACP / USERS and GROUPS / GROUPS --> Manage Groups --> Bots --> Settings:

example:
  • Display group in legend: no catch
Remember that you can also control the presence via ACP, if necessary.
Make sure that bots do not have access rights to the forums, if necessary also.
Create a robots.txt and protect directories (!).

Best regards
That just means the group name is not in the legend. It doesn't mean the bots, online at the time, are not displayed in the index stats as visiting the board in the last X minutes.
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
Talk19Zehn
Registered User
Posts: 809
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Hiding search bots from "WHO IS ONLINE"

Post by Talk19Zehn »

Yeah, that´s right! I have understood the question: The group hide bots ..

example ... ff
Talk19Zehn wrote:Make sure that bots do not have access rights to the forums, if necessary also.
Remember that you can also control the presence via ACP, if necessary.
Create a robots.txt and protect directories (!).


;)
Last edited by Talk19Zehn on Thu Nov 20, 2014 7:04 pm, edited 2 times in total.
User avatar
KevC
Support Team Member
Support Team Member
Posts: 71738
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Hiding search bots from "WHO IS ONLINE"

Post by KevC »

On the index where it says this

Who is online

In total there are 1418 users online :: 97 registered, 7 hidden and 1314 guests (based on users active over the past 90 minutes)
Most users ever online was 8680 on Mon Mar 19, 2007 1:28 am

Registered users: _Vinny_, ABDev, Adr!, advocatus, aka_void, Arty, asinshesq, axtolf, Baidu [Spider], BianCionaa, Bing [Bot],

........the OP wants it so the bots do not show up in that list but does still want them to come otherwise the site will be unindexed. Turning off their legend name doesn't do that
-:|:- Support Request Template -:|:-
Image
"Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb"
User avatar
Talk19Zehn
Registered User
Posts: 809
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Hiding search bots from "WHO IS ONLINE"

Post by Talk19Zehn »

Yeah, - If I'm not in the Who's online display let the group bots, I can control the presence via ACP.
User avatar
RMcGirr83
Former Team Member
Posts: 21971
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Hiding search bots from "WHO IS ONLINE"

Post by RMcGirr83 »

Change this in the includes/functions.php file within the obtain_users_online_string function

Code: Select all

		$sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
				FROM ' . USERS_TABLE . '
				WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
				ORDER BY username_clean ASC';
to this

Code: Select all

		$sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
				FROM ' . USERS_TABLE . '
				WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
				AND user_type <> ' . USER_IGNORE . '
				ORDER BY username_clean ASC';
And bots will be ignored from the display
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
User avatar
Talk19Zehn
Registered User
Posts: 809
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Hiding search bots from "WHO IS ONLINE"

Post by Talk19Zehn »

Hi, okay! I do not understand: In the ACP under System / General Functions / spiders, robots you have but the option to disable bots. What happens then? If the bots disappears if deactivated anyway? What consequences has a deactivation on the site?

In the legend I must not view the group, as this would be a separate setting. I would like to know why a function = possibility of deactivation in the ACP does not work and I should intervene in the system, is incomprehensible to me. I have not found a suitable explanation.
I would like to understand how it works. Thank you!
nitram12345
Registered User
Posts: 2
Joined: Thu Nov 20, 2014 9:42 am

Re: Hiding search bots from "WHO IS ONLINE"

Post by nitram12345 »

RMcGirr83 wrote:Change this in the includes/functions.php file within the obtain_users_online_string function
This was exactly what I was after. Thanks a lot for helping me. :) If you got paypal, PM me and I'll donate you ~a beer.
Thumper1337x
Registered User
Posts: 63
Joined: Tue Sep 27, 2011 6:46 pm

Re: Hiding search bots from "WHO IS ONLINE"

Post by Thumper1337x »

RMcGirr83 wrote:Change this in the includes/functions.php file within the obtain_users_online_string function

Code: Select all

		$sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
				FROM ' . USERS_TABLE . '
				WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
				ORDER BY username_clean ASC';
to this

Code: Select all

		$sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
				FROM ' . USERS_TABLE . '
				WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
				AND user_type <> ' . USER_IGNORE . '
				ORDER BY username_clean ASC';
And bots will be ignored from the display
Works great, Thank you! :mrgreen:
Regards,
Thumper
User avatar
Lumpy Burgertushie
Registered User
Posts: 69129
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Hiding search bots from "WHO IS ONLINE"

Post by Lumpy Burgertushie »

Talk19Zehn wrote:Hi, okay! I do not understand: In the ACP under System / General Functions / spiders, robots you have but the option to disable bots. What happens then? If the bots disappears if deactivated anyway? What consequences has a deactivation on the site?

In the legend I must not view the group, as this would be a separate setting. I would like to know why a function = possibility of deactivation in the ACP does not work and I should intervene in the system, is incomprehensible to me. I have not found a suitable explanation.
I would like to understand how it works. Thank you!
there is a difference between deactivating the bot or the bot group and removing them from the who is online area.

if you deactivate the bot it will no longer be a member and therefore you can not control what it can see or not see on your board. just like if you deactivate any member. bots are members with special permissions that you can control by changing the bot group permissions etc.

what this discussion is about, is removing the listing of the bots from the who is online section at the bottom of the page. I am not sure why anyone cares but that is what they are trying to do. there is no way to separate the bots from other members in the whosonline code without editing the php files themselves.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
Talk19Zehn
Registered User
Posts: 809
Joined: Tue Aug 09, 2011 1:10 pm
Contact:

Re: Hiding search bots from "WHO IS ONLINE"

Post by Talk19Zehn »

Okay, thank´s for your post. I understand now this discussion.
northernchimp
Registered User
Posts: 92
Joined: Tue May 19, 2009 10:26 am

Re: Hiding search bots from "WHO IS ONLINE"

Post by northernchimp »

RMcGirr83 wrote:Change this in the includes/functions.php file within the obtain_users_online_string function

Code: Select all

		$sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
				FROM ' . USERS_TABLE . '
				WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
				ORDER BY username_clean ASC';
to this

Code: Select all

		$sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
				FROM ' . USERS_TABLE . '
				WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
				AND user_type <> ' . USER_IGNORE . '
				ORDER BY username_clean ASC';
And bots will be ignored from the display
Brilliant, thank you so much.
User avatar
RMcGirr83
Former Team Member
Posts: 21971
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Hiding search bots from "WHO IS ONLINE"

Post by RMcGirr83 »

Update, there is now an event, since 3.1.4-RC1, that can be used to do this exact thing without having to modify the core phpBB code.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beerImage
zorbas2
Registered User
Posts: 49
Joined: Fri Apr 02, 2010 5:51 am

Re: Hiding search bots from "WHO IS ONLINE"

Post by zorbas2 »

Where do I find this event/setting in 3.1.4 ?? Thanks!!
Locked

Return to “[3.1.x] Styles Support & Discussion”