No bots BBCode

Get help developing custom BBCodes or request one.
User avatar
Stoker 4.0
Registered User
Posts: 1779
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen

No bots BBCode

Post by Stoker 4.0 »

This BBCode allows you to post content hidden for bots.
Inspired by Cabot

BBCode usage:

Code: Select all

[hidebots]{TEXT}[/hidebots]
HTML replacement:

Code: Select all

<xsl:choose>
	<xsl:when test="$S_IS_BOT">
	</xsl:when>
	<xsl:otherwise>
		{TEXT}
	</xsl:otherwise>
</xsl:choose>
Help line:

Code: Select all

This BBCode allows you to hide content for bots: [hidebots]Registered bots cant read this[/hidebots]]
~ The greatest achievement in life is to inspire ~
Regards Stoker
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6835
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: No bots BBCode

Post by thecoalman »

While it may not be the intent just be aware this may be considered deceptive practice by SE's. See the section on cloaking.

https://developers.google.com/search/do ... m-policies
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
Stoker 4.0
Registered User
Posts: 1779
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen

Re: No bots BBCode

Post by Stoker 4.0 »

thecoalman wrote: Sun May 04, 2025 7:47 am While it may not be the intent just be aware this may be considered deceptive practice by SE's. See the section on cloaking.
I am aware of this. And that would be the case if this bbcode did SHOW content only for bots.
This one HIDE it. Just like you see several places in core template files.

But of course, if its used for promoting drugs, guns etc on a site with Google Ads, it would be illegal according the their guidelines.
So yes, it can be abused. But if so, you probably know your on the wrong side.
~ The greatest achievement in life is to inspire ~
Regards Stoker
User avatar
RomaamoR
Registered User
Posts: 325
Joined: Tue Feb 24, 2015 4:45 pm
Location: Ukraine
Name: Roman

Re: No bots BBCode

Post by RomaamoR »

How can I check that the bot doesn't see the content?
For example, an image. After all, externally, after using BBCode, nothing has changed.
User avatar
Stoker 4.0
Registered User
Posts: 1779
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen

Re: No bots BBCode

Post by Stoker 4.0 »

You can browse your pages using a bot simulator.
Something like http://botsimulator.com/ perhaps

Nothing should change, except registered bots cant read it
~ The greatest achievement in life is to inspire ~
Regards Stoker
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6835
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: No bots BBCode

Post by thecoalman »

Stoker 4.0 wrote: Sun May 04, 2025 8:16 am This one HIDE it. Just like you see several places in core template files.
Hiding or showing it doesn't matter. e.g. you hide ads so the bot think it's a site with no ads. There is plenty of examples of deceptive practices where you hide things that would be considered cloaking.

I'm not saying that is the purpose but if Google determines that is the purpose it can affect your site rankings.
Stoker 4.0 wrote: Sun May 04, 2025 11:09 am You can browse your pages using a bot simulator.
Browsers have user agent switcher extensions for this. You'll need to log out and may need to clear cookies. If you are using Cloudflare or similar service you'll get blocked and need to use local DNS to go around Cloudflare.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
Stoker 4.0
Registered User
Posts: 1779
Joined: Sun Feb 13, 2011 1:33 pm
Location: Funen, Denmark
Name: Ulrik Christensen

Re: No bots BBCode

Post by Stoker 4.0 »

Agree, use with caution.
My point was that "if not s_is_bot" is used in the core templates.
~ The greatest achievement in life is to inspire ~
Regards Stoker
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 6835
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.

Re: No bots BBCode

Post by thecoalman »

Right, you are hiding a handful of links to pages it can't index. You aren't changing the main content of the page.

That said robots.txt rules and rel="noindex" may be preferable over hiding it.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
dontcoz
Registered User
Posts: 519
Joined: Mon Sep 29, 2008 9:49 pm
Location: Vancouver, BC

Re: No bots BBCode

Post by dontcoz »

new bots don't respect robots.txt rules. robots.txt is a suggestion, not a mandate.

Return to “Custom BBCode Development and Requests”