Is it possible to shield a plugin (freetags) depending on User-Agent?
For search engines, with a rather large tag cloud on each page the rating for the page rapidly decreases (too much keywords) and with all the same keywords on all the pages the blog pages become rather similar from the view of a search engine spider so the pages (and sometimes the whole (sub-)domain have a high potential ending up e.g. in googles supplementary index.
so i'd like to shield the plugin to not show up if e.g. googlebot retrieves the page(s).
I know I can hack the plugin (did this for gallery2) but I am curious if there is a more general approach, as this may also affect other plugins as well.
Thanks,
\Maex
shield plugin (freetag sidebar) by User-Agent
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: shield plugin (freetag sidebar) by User-Agent
Hi!
I believe that google and the likes have HTML tages like <noindex>...</noindex> (and a XHTML variant) that can shield portions of your webpage.
You could create an event plugin to filter out those plugins (like the 'serendipity_event_sidebarhider' plugin already does depeding on category view or user permissions), or also use Smarty templating markup to do it. (use {if} checks inside the sidebar.tpl file to check for the currently iterated sidebar item title and also check $smarty.SERVER.HTTP_USER_AGENT for a searchengine).
It's not something I'd recommend though because it involves coding and is not trivial.
Regards,
Garvin
I believe that google and the likes have HTML tages like <noindex>...</noindex> (and a XHTML variant) that can shield portions of your webpage.
You could create an event plugin to filter out those plugins (like the 'serendipity_event_sidebarhider' plugin already does depeding on category view or user permissions), or also use Smarty templating markup to do it. (use {if} checks inside the sidebar.tpl file to check for the currently iterated sidebar item title and also check $smarty.SERVER.HTTP_USER_AGENT for a searchengine).
It's not something I'd recommend though because it involves coding and is not trivial.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: shield plugin (freetag sidebar) by User-Agent
The only thing I know of in this area is Yahoo (and AFAIK only Yahoo) supporting a e.g. <div class="robots-nocontent">. See http://www.ysearchblog.com/archives/000444.htmlgarvinhicking wrote:Hi!
I believe that google and the likes have HTML tages like <noindex>...</noindex> (and a XHTML variant) that can shield portions of your webpage.
Other instructions are possible via META tags, but have effect on the whole page. See http://www.robotstxt.org/meta.html
Never seen <noindex> and can't find any information with google.
I think I'll have a look at modifing the freetags plugin for now.
Thanks Garvin,
\Maex
According to Wikipedia, Google advocates the use of nofollow (http://en.wikipedia.org/wiki/Nofollow) to avoid internal spamlinking. Yahoo and MSN followed suit. This would be a fairly trivial modification to the tag plugin.