Hey folks - you guys seem really friendly and helpful!
First off I have SMF 1.1.3, Ad management mod 2.3 and DilberMC theme.
I have had the ads working correctly before with the same versions etc, but got hacked and had to start over. This time the ads show up twice in the admin ad management area. But they only show up once - working correctly - in the forum EXCEPT the "display ads on the post page" option, where they show up twice one after the other.
I did read the similar post and you suggested checking the uploaded files for duplicates in the theme folder. I have done this and it looks fine to me - but heres a copy and paste anyway -
Up one level
images 777
languages 777
Create New File
BoardIndex.template.php 23 k 0644
MessageIndex.template.php 26 k 0644
Settings.template.php 6 k 0666
index.php 0 k 0666
index.template.php 36 k 0644
style.css 9 k 0666
style_lightblue.css 8 k 0666
style_lightbrown.css 8 k 0666
style_lightgolden.css 8 k 0666
style_lightgreen.css 8 k 0666
style_lightlilac.css 8 k 0666
style_lightnavy.css 8 k 0666
style_lightolive.css 8 k 0666
style_lightred.css 7 k 0666
style_lightrose.css 8 k 0666
style_lightsilver.css 8 k 0666
style_lightturquoise.css 8 k 0666
style_lightviolet.css 8 k 0666
theme_info.xml 0 k 0666
The Boardindex.template.php, Messageindex.template.php and Indextemplate.php files only show once - these are the files I uploaded from here to make the theme work.
I downloaded the dilber.zip file from here - http://files4.smfhelp.com/index.php?dir=Ad+mod+edited+files%2F
Perhaps I should have used the dilbertp.zip file?
Anyway, any help is appreciated.
Cheers
Mulpsy
You have to make sure the edits weren't duplicated as well.
SMF v1.1.4 - TinyPortal v1.0.5 beta 1© Bloc | Theme based on Tolkien design by Bloc
Can someone reply where this issue is answered?
I have read several posts with the same issue, but not found the definitive answer.
There are two ads displaying one below the other.
(http://womenmotorcyclist.com/forum/ss-ads2.jpg)
My database shows one entry only for each ad I have entered, however the admin panel displays two each.
(http://womenmotorcyclist.com/forum/ss-ads1.jpg)
Modify or delete one and the other is affected accordingly.
I have checked the index.template.php in the theme in use and found only three occurrences of code relative to ads.
One each for the placement options:
//Display ads on the top of the page
if (!empty($settings['use_ads']) && function_exists("show_topofpageAds"))
{
$ads = show_topofpageAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
echo '
<table width="100%" cellspacing="0" cellpadding="2">
<tr>';
if(!empty($settings['use_ads']) && function_exists("show_towerleftAds"))
{
$ads = show_towerleftAds();
if(!empty($ads))
{
echo ' <td valign="top">';
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
echo ' </td>';
}
unset($ads);
}
and a few lines later:
if(!empty($settings['use_ads']) && function_exists("show_towerrightAds"))
{
$ads = show_towerrightAds();
if(!empty($ads))
{
echo ' <td valign="top">';
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
echo ' </td>';
}
unset($ads);
}
echo ' </tr>
</table>
</td></tr></table>';
and finally...
if(!empty($settings['use_ads']) && function_exists("show_bottomAds"))
{
$ads = show_bottomAds();
if(!empty($ads))
{
echo '
<div>';
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
echo '
</div>';
}
unset($ads);
}
Then I checked the folders via ftp and found NO duplicates (that wouldn't be allowed anyway - at least in the same folder!)
Here are my entries in the "installed list"
TinyPortal|^|TPv1.05beta1.zip|^|bloc:tinyportal|^|1.052
Ad Managment|^|ad_mod_1-1-x_v2-3.zip|^|jeremy:ads|^|2.3
Auto Embed Video Clips|^|AEVC_v2.1.5.zip|^|karlbenson:autoembedvideoclips|^|2.1.5
Location on Member List|^|locmemberlist_1.0.zip|^|rsw:locmemberlist|^|1.0
Previous and Next Links for Page Index|^|PrevNextPage.zip|^|Gigi:PrevNextPage|^|1.0
Zodiac_13Moon|^|zodiac_13moon_v2.2.zip|^|koji:Zodiac_13Moon|^|2.2
EmailFlash|^|EmailFlash.zip|^|snork13:EmailFlash|^|2.0
SMF Gallery Lite|^|Gallery1.8.3.zip|^|vbgamer45:smfgallery|^|1.8.3
Interestingly through this exercise, I discovered that the AD code doesn't necessarily need to be placed in a table if the ad is internal and not part of a campaign like google Ad Sense or the like!
I'd like to use this mod, but can't until this is resolved.
Additional note for the developer... Look at my installed list "Ad Management" is spelled incorrectly. "Ad Managment"
I just noticed the following...
The double ads only show up when:
Display ads on board index is checked
Display ads on every page right below the menu
When this is checked, they don't show up at all
When I check:
Display ads on every page on the top of the page
One occurrence shows up but centered on page (not #main) which looks odd on this theme.
When I check "Display ads on the bottom of the page" One occurrence.
as with the ads placed under and between posts.
But there's still two entries in admin as described above..
OK, I finally found something useful...
Quote from: facing the facts on March 18, 2008, 05:40:27 PM
To help anyone else, here are the possible files affected. 8)
admin.php
admin.template.php
ads.php
ads.english.php
ads.template.php
display.template.php
LoadAds.php,
modifications.english.php
index.php (main folder)
____________________________________
TITLE: Ad Mod Problem - Fix
PHP DOC: index.php (main folder)
PURPOSE: Ad titles appeared in duplicate on the AdModule Control Panel
CODE IN PLACE:
if (function_exists("loadAds"))
loadAds();
if (function_exists("loadAds"))
loadAds();
MODIFIED CODE:
if (function_exists("loadAds"))
loadAds();
Thanks Panzer!
http://www.iscripting.net
Quoteindex.php (main folder)
I did indeed find not only the specific code mentioned, but two more doubled code hash's in that file.
This solved the Ads showing up twice in the Ads Admin Panel..I looked in thos listed files that I could find for double entries and then searched for files named:
admin.template.php
ads.english.php
ads.template.php
display.template.php
modifications.english.php
But could not find them - Is it possible they are from a former version of SMF or TP?????
However, I still have the DOUBLE ADS on the top of the Board Index when "Display ads on board index is checked"Again, can anyone point to the specific file(s) and their locations that display the Board Index Ads?
OK, so I found those files in the "Default" Theme...
In the "BoardIndex.template.php" I found this twice
//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
Once removed, It solved the problem.....
To summarize,
There were three duplicate entries in:
> forum > Themes > default > BoardIndex.template.phpremoving the duplicates resolved the Double Entries in the
Ads Admin Paneland one double entry in:
> forum > index.phpOnce removed, The double banners on the
Board Index went away...
So... Jerm, I suggest that you make this solution more readily available to those future folks who have this common problem, and then look into an "if exists" code to place in your installation package to avoid this in the future.
It took me several hours to find the KEY to solving this and a thanks to Panzer as well!
;D
I thought I had this worked out, but I just noticed one more double ad.
It's on the page loaded on "index.php?board=xx.x" (xx.x being board number)
Not on the Board index or the topic page.
I've been thru all the files listed and many more, but I can't find any more double/repeated code.
Can anyone suggest another file to quadruple check?
Again my thanks to Panzer...
More duplicate entries...
In
Themes/default/MessageIndex.phpI removed one of two:
//Display Ads on the Message index
if (function_exists("show_threadindexAds"))
{
$ads = show_threadindexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
Also in
Sources/Subs.php I commented one out...
/* loadLanguage('Ads'); DBL ENTRY REMOVED (BAS) */
loadLanguage('Ads');
That seems to have done it.
So lets add these two files to the list:
Quote from: facing the facts on March 18, 2008, 05:40:27 PM
Sources/Subs.php
Themes/default/MessageIndex.php
Another note: Panzer suggested a program to help locate these snippets.
I have used Textpad for years but Notepad+++ available at http://notepad-plus.sourceforge.net/uk/download.php
Has some very cool features worth exploring...
;D
I went through all of the files you listed and it cleaned up a lot. I know show only one ad at a time under the "Edit Ads". However, my ads are still showing in triplicate. What else do I need to check to get this figured out. It's been going on for a couple of weeks, very frustrating at this point. My site is www.chasintailfishin.com/forum