You will need to create a Plugin.
Product: vBulletin
Name: Hide Content From Bots
Hook: showthread_start
Execution order: 5
PHP Code:
// bots list ([] = add a new item in the end of an array)
$hide_content_agent_list[] = "GoogleBot";
$hide_content_agent_list[] = "Mediapartners-Google";
$hide_content_agent_list[] = "ad more...";
// get the user agent
$hide_content_useragent = $_SERVER['HTTP_USER_AGENT'];
// the default is true, false for bots (<else />)
$show_for_humans = true;
foreach($hide_content_agent_list as $hcag) {
if (preg_match("/$hcag/i", "$hide_content_useragent")) {
$show_for_humans = false;
break;
}
}
Plugin is active:
Yes //do not forget it
Then use the condition either this:
Code:
<if condition="$show_for_humans">
code to be show only for humans
</if>
Code:
<if condition="$show_for_humans">
code to be show only for humans
<else />
the replacement text for bots
</if>