update: I went so far as moving the code out of "archive/global.php" into "includes/init.php", where $show['search_engine'] is defined.
I replaced:
PHP Code:
$show['search_engine'] = ($vbulletin->superglobal_size['_COOKIE'] == 0 AND preg_match("#(google|msnbot|yahoo! slurp)#si", $_SERVER['HTTP_USER_AGENT']));
with
PHP Code:
/**
* Return true if visited by a robot.
*/
function is_robot_visit()
{
require_once(DIR . '/includes/class_xml.php');
$xmlobj = new XMLparser(false, DIR . '/includes/xml/spiders_vbulletin.xml');
$spiderdata = $xmlobj->parse();
if (is_array($spiderdata['spider']))
{
foreach ($spiderdata['spider'] AS $spiderling)
{
if (isset($_SERVER['HTTP_USER_AGENT']) AND preg_match("#". preg_quote($spiderling['ident'], '#') . "#si", $_SERVER['HTTP_USER_AGENT'])) {
return true;
}
}
}
unset($spiderdata, $xmlobj);
return false;
}
$show['search_engine'] = is_robot_visit();
Everything works great!