Coinbase

Author Topic: ads display twice  (Read 10279 times)

0 Members and 1 Guest are viewing this topic.

Offline kase

  • Newbie
  • *
  • Posts: 3
Re: ads display twice - FIX for Default Theme
« Reply #15 on: June 19, 2008, 08:00:43 am »
For people using SMF 1.1.5 with the default theme you can fix the double ads showing by editing the file in the path:- /Themes/default/index.template.php

Open the file and look for all entries where ads are to be displayed. For example:

Code: [Select]
//Show ads on the bottom of the page
$ads = show_bottomAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);

If you are getting double ads the above code will be duplicated in the index.template file. Simply comment out one of them like:

Code: [Select]
//Show ads on the bottom of the page
//$ads = show_bottomAds();
//if(!empty($ads))
//if($ads['type']==0)
//echo $ads['content'];
//else
//eval($ads['content']);
//unset($ads);

Should work for most themes if you can find the theme index file and then look for duplicates. Just comment them out or save a back up of your file and remove the duplicates! Done...

Hope this helps.

Kase

Offline gri

  • Full Member
  • ***
  • Posts: 111
  • Space Human
Re: ads display twice
« Reply #16 on: June 19, 2008, 09:04:46 am »
Quote from: [url=http://www.smfads.com/forums/index.php?topic=378.msg6724#msg6724]kase in ~ads display twice - FIX for Default Theme~[/url]
Simply comment out one of them

kase,

if the effect of code duplicating is present
then in general almost all code fragments of the modification
are duplicated (check it and confirm please).

So you will be tired of erasing the extra code manually..
each time after next installation.

Quote from: [url=http://www.smfads.com/forums/index.php?topic=378.msg6724#msg6724]kase in ~ads display twice - FIX for Default Theme~[/url]
Simply comment out one of them

It is incorrect to comment the extra fragments
because thus you will block the automatic uninstallation possibility.

Quote from: [url=http://www.smfads.com/forums/index.php?topic=378.msg6724#msg6724]kase in ~ads display twice - FIX for Default Theme~[/url]
Should work for most themes

The original mod does not effect other themes at all -
neither once nor twice.


Better try PAY-ME mod instead
after unerasing the original mod messing.
Instruction on getting Help on PAY-ME (AdManagement) mod installing.
Your GRItoadMIXes

Offline kase

  • Newbie
  • *
  • Posts: 3
Re: ads display twice
« Reply #17 on: June 19, 2008, 04:10:17 pm »
Hi Gri,

Quote
So you will be tired of erasing the extra code manually..
each time after next installation.

I am not sure why there would be a "next installation" but I only found two duplcates of the code in index.template.php of the default theme, one for Top ads and one for Bottom ads.

Quote
It is incorrect to comment the extra fragments
because thus you will block the automatic uninstallation possibility.

I had trouble with uninstalling the Ad module after the first FRESH install anyway.

If people do install the Ad Mod (which I think is a great mod btw) they must want ads in their forum. If not they should not install it. Also they can turn Ads off in their froum via the Ad Management console.

I like the mod just as so many seem to also. I think I have the Ads working fine for now anyway. I'm a happy chappy :) Maybe others will find a better fix than me, but it's a start.

Thanks for your reply even though it didn't help me. My ads are on http://www.talkproperty.net.au/property/index.php for any sight see'ers

Regards,
Kase

[sp fixed]
« Last Edit: June 19, 2008, 04:13:45 pm by kase »

SMF Ads Support Forum

Re: ads display twice
« Reply #17 on: June 19, 2008, 04:10:17 pm »
.