SMF Ads Support Forum

Support => General Support => Topic started by: npereira on July 14, 2009, 12:01:44 PM

Title: DO NOT show ads in specific locations
Post by: npereira on July 14, 2009, 12:01:44 PM
How is this done?

I am runining SMF 2.0RC1-1 with SMFAds 2.3.5
I also have eNinja - Custom Pages mod 1.0.12

I have ads that show up at both top and bottom of the site everywhere on the site.
in one of my custom pages (http://www.blabla.ca/index.php?action=page;sa=advertisers) I dont want the top and bottom ads to show.

How can this be done?
Title: Re: DO NOT show ads in specific locations
Post by: ccbtimewiz on July 14, 2009, 03:27:19 PM
Attach your index.template.php file.
Title: Re: DO NOT show ads in specific locations
Post by: npereira on July 15, 2009, 06:51:23 AM
Here it is
Title: Re: DO NOT show ads in specific locations
Post by: ccbtimewiz on July 15, 2009, 11:46:56 AM
Find:
//Display ads on the top of the page
if (function_exists("show_topofpageAds"))
{
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}


Replace with:
//Display ads on the top of the page
if (function_exists("show_topofpageAds") && @$_GET['action'] !== 'page')
{
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
Title: Re: DO NOT show ads in specific locations
Post by: npereira on July 15, 2009, 01:43:39 PM
It would be nice to have this as a setting in the Ads mod...

Do you think you will ever do this?