SMF Ads Support Forum

Support => General Support => Topic started by: scandalous on December 08, 2006, 12:43:08 pm

Title: ads display twice
Post by: scandalous on December 08, 2006, 12:43:08 pm
Hi.

On my board, the banner ads display double.  Instead of displaying one banner ad, the ad displays twice - one on top of the other.  That is my biggie right now.

Also, ads don't appear every place I designated them to, but I read on this forum that that is a template issue and I'm not real comfortable rooting around and altering files.

But that first issue - any clues on that???

Thanks!

Stephanie!
Title: Re: ads display twice
Post by: bigguy on December 09, 2006, 10:04:03 am
If you have all the boxes checked to show ads it will do that or if the code has been added twice to the template files. You will have to look to see.
Title: Re: ads display twice
Post by: kahane1 on February 13, 2007, 12:26:08 pm
could you please post a detailed instructions on how to check the template files for multiple edits as well as how to delete it?
Title: Re: ads display twice
Post by: bigguy on February 18, 2007, 02:09:58 pm
There is already in the themes support board. They are all stickied.
Title: Re: ads display twice
Post by: DeyanMarkovski on June 07, 2007, 03:30:18 am
if the code has been added twice to the template files. You will have to look to see.
Where is this?
Title: Re: ads display twice
Post by: callcall on June 15, 2007, 04:05:29 pm
I have same problem ? How can we fix it ? Also Ad management is not working properly. I am using smf 1.1.2 and ad management 2,3 .Please help!!! :'(
Title: Re: ads display twice
Post by: bigguy on June 15, 2007, 05:08:57 pm
Check the index.php in the ROOT of your SMF install for duplicate code. Also check the 4 template files in your theme you are using that are listed in the stickie in the Theme Support board. Remove all the duplicate code you see. All the code can be found in the Theme Support board stickied to the top.
Title: Re: ads display twice
Post by: Soulgirl on November 05, 2007, 05:16:20 pm
Hi BigGuy,

I've checked all my files and there's no duplicate code.  It's very odd.  Any other ideas?
Title: Re: ads display twice
Post by: AZBOfin on November 10, 2007, 10:34:08 pm
Hi All.

First things first: Thanks for this great mod!

I am having the same issue. During setup, when adding new ads, the script adds an ad twice to the database and therefore they are displayed twice. I checked with the default theme and a custom theme, where I did the modifications manually - the code seems to be correct. I believe the problem is during the setup of ads and not during the display routines. I not a programmer (yet) but it seems that during the add routine a record is added twice.

I am in the dark.

Any help is greatly appreciated and thanks again for this mod.

AZBOfin


Title: Re: ads display twice
Post by: AZBOfin on November 10, 2007, 10:53:53 pm

...correction...

All is good now  ;D

After removing the package and a clean re-install it's working like a charm  8)

AZBOfin
Title: Re: ads display twice
Post by: jeanlouis on November 22, 2007, 11:40:57 am
With 1.1.4 I have four display of benners as I posted previously, with a new install without patch and only smf 1.1.3 I have only two display of banners
I have no solution
Title: Re: ads display twice
Post by: sniperfan on February 12, 2008, 07:05:34 pm
Hi all!

I want to ask you how to deal with this problem, because I have it on my board too!  :-\
Here's a link to my forum (see the three banners below the menu) - http://rocketball.eu/forum/ . If you can't see them, they are not two, they are three banners over there. I can't edit the index.template.php, because there is almost every time syntax error. The thing that I saw is that there codes that are have been typed several times, as I said I've tried to leave only one of them, but it doesn't work properly.
I've tried also to re-install again and again the package, but still the same.
Can someone please tell me, how to fix the problem?

Thanks in advance!
Title: Re: ads display twice
Post by: kinetic on April 22, 2008, 06:07:38 pm
This happened to me too, when I tried deleting and re-installing the mod.
My guess is it leaves some of the code when it is deleted, and this code is duplicated on the next install.
Title: Re: ads display twice
Post by: gri on April 25, 2008, 12:49:49 am
Quote from: [url=http://www.smfads.com/forums/index.php?topic=378.msg1928#msg1928]scandalous in ~ads display twice~[/url]
On my board, the banner ads display double.

to all:

I am not sure that you have tried the humanized mod
   and are subscribed to

   antchugoviks

   PAY-ME mod for SMF 1.1.X
<< http://gri.sunshinehost.net/index.php?topic=1073.msg1734#msg1734 ,

   PAY-ME mod for SMF 2.0
<< http://gri.sunshinehost.net/index.php?topic=1420.msg2145#msg2145 .
Title: Re: ads display twice
Post by: gri on May 20, 2008, 06:09:02 am
No more double ads.

   PAY-ME mod is the operable alternative to Ad Management mod
<< http://www.smfads.com/forums/index.php?topic=1639.msg6628#msg6628 .
Title: Re: ads display twice - FIX for Default Theme
Post by: kase 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
Title: Re: ads display twice
Post by: gri 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.
Title: Re: ads display twice
Post by: kase 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 (http://www.talkproperty.net.au/property/index.php) for any sight see'ers

Regards,
Kase

[sp fixed]