Forum Moderators: martinibuster
That's one way to do it. It's quick & dirty, and you'll have to re-implement whenever you update your CMS, but it works.
<?GLOBAL $REQUEST_URI;
adcode = " --- your google code --- ";
if (is_integer(strpos($REQUEST_URI,"privmsg")) or is_integer(strpos($REQUEST_URI,"search")) or is_integer(strpos($REQUEST_URI,"posting")) or is_integer(strpos($REQUEST_URI,"profile"))) {
$adcode="";
}
echo $adcode;
?>
This will display ads on all pages, except - in this example - any pages with those words in the URL, like 'search'. Incidentally, this code contains the pages I currently don't display ads on for phpBB.
Hope that helps a bit. Don't forget to escape the " marks when you cut and paste the Google ad code.