PDA

View Full Version : Assign usergroup to crawlers/bots


Cornolio
06-06-2005, 07:53 AM
Is it possible to assign a usergroup only to crawlers and bots?
Now i've assigned a search-engine-optimized style to unregistred users, but i'd like to modify the style to reduce links.
The problem is that i'd prefer not to remove links for unregistred users

Andreas
06-06-2005, 10:45 AM
** UNTESTED **

In global.php
FIND

define('VB_AREA', 'Forum');


BELOW that ADD

if (!is_array($specialtemplates))
{
$specialtemplates = array('wol_spiders');
}
else
{
$specialtemplates = array_merge($specialtemplates, array('wol_spiders'));
}



FIND

$styleid = intval($styleid);


BELOW that ADD

$spiderstring = $datastore['wol_spiders']['spiderstring'];
if (preg_match("#($spiderstring)#si", strtolower($session['useragent'])))
{
$styleid = X;
}


To test if this does work you must change your useragent.
Please note that X must be replaced with the style ID you want to assign.

Cornolio
06-06-2005, 05:01 PM
tnx! i'm gonna test it. this should work for it http://www.widexl.com/remote/search-engines/metatag-analyzer.html