News:

Welcome to SMF Ads Support Forum

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.

scandalous

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!

bigguy

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.

kahane1

could you please post a detailed instructions on how to check the template files for multiple edits as well as how to delete it?

bigguy

There is already in the themes support board. They are all stickied.

DeyanMarkovski

Quote from: bigguy on December 09, 2006, 10:04:03 AM
if the code has been added twice to the template files. You will have to look to see.
Where is this?

callcall

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!!! :'(

bigguy

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.

Soulgirl

Hi BigGuy,

I've checked all my files and there's no duplicate code.  It's very odd.  Any other ideas?

AZBOfin

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



AZBOfin

#9

...correction...

All is good now  ;D

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

AZBOfin

jeanlouis

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

sniperfan

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!

kinetic

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.

gri

#13
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 .
Instruction on getting Help on PAY-ME (AdManagement) mod installing.
Your GRItoadMIXes

gri

#14
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 .
Instruction on getting Help on PAY-ME (AdManagement) mod installing.
Your GRItoadMIXes

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]