News:

Help keep this project going by donating or buying adseller pro

Main Menu
Coinbase

ads display twice

Started by scandalous, December 08, 2006, 12:43:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kase

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:


//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:


//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

gri

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

kase

#17
Hi Gri,

QuoteSo 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.

QuoteIt 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]