Coinbase

Author Topic: DO NOT show ads in specific locations  (Read 3060 times)

0 Members and 1 Guest are viewing this topic.

Offline npereira

  • Newbie
  • *
  • Posts: 7
DO NOT show ads in specific locations
« on: July 14, 2009, 11:01:44 am »
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?

Offline ccbtimewiz

  • Sr. Member
  • ****
  • Posts: 326
    • Dream Portal
Re: DO NOT show ads in specific locations
« Reply #1 on: July 14, 2009, 02:27:19 pm »
Attach your index.template.php file.

Offline npereira

  • Newbie
  • *
  • Posts: 7
Re: DO NOT show ads in specific locations
« Reply #2 on: July 15, 2009, 05:51:23 am »
Here it is

Offline ccbtimewiz

  • Sr. Member
  • ****
  • Posts: 326
    • Dream Portal
Re: DO NOT show ads in specific locations
« Reply #3 on: July 15, 2009, 10:46:56 am »
Find:
Code: [Select]
//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:
Code: [Select]
//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);
}

Offline npereira

  • Newbie
  • *
  • Posts: 7
Re: DO NOT show ads in specific locations
« Reply #4 on: July 15, 2009, 12: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?

SMF Ads Support Forum

Re: DO NOT show ads in specific locations
« Reply #4 on: July 15, 2009, 12:43:39 pm »
.