SMF Ads Support Forum

Support => General Support => Topic started by: MarcBkk on June 09, 2007, 12:16:50 AM

Title: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 09, 2007, 12:16:50 AM
Is it possible to use the SMF Ads plug-in to display banner ads which are in the form of JPG or GIF files by creating a link to the file on a server?

I installed the plug-in and tried to configure it, but it seems I can only put in HTML or PHP code for ad services like Google Adsense.

Any direction on this would be much appreciated.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: ITA003 on June 11, 2007, 04:25:47 AM
You can insert this HTML code for insert your image...


<a href="www.putDestUrlHere.domain/">
<img src="http://www.yourimageserver.domain/Image_Name.gif" />
</a>


Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 11, 2007, 06:07:10 AM
Many thanks. I tried what you sugessted, but adds don't seem to be coming up. I am attaching a screen shot of my settings. Did I possibly do something wrong?
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: ITA003 on June 11, 2007, 12:21:55 PM
The code is right!!
Do you enable the ads in the Permissions section?
To do this look at:

Go to Admin -> Permissions -> Guests group (Click on Modify) -> Check Enable Ads permission and Save changes

You must enable Ads for every Group do you want to show the Ads.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 11, 2007, 08:04:16 PM
Thanks Again. Ad Permissions are enabled for all groups. So still not sure what the problem is  ???
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: ITA003 on June 12, 2007, 01:13:45 PM
But the Google Adsense ads works properly?
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: bigguy on June 12, 2007, 06:53:41 PM
This is what I use:

Quote<div align=center><a href="http://www.smfhelper.info">
<img src="http://www.smfhelper.info/pic.jpg">
</a></div>

Are there any errors in your error log. ???
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 12, 2007, 07:47:08 PM
Thanks, I have not tried it with Google ads yet.

I changed the code to this, which is what you have, but still not working BigGuy:

<div align=left><a href="http://www.thaitriptips.com">
<img src="http://www.thaitriptips.com/TTTbanner.jpg">
</a></div>

I checked the error log, which is registering an error every few seconds and which looks like this:

http://www.photographythailand.com/Forum/index.php?action=viewErrorLog;desc;start=0 

8: Undefined index: lang_locale
/home/marcbkk/public_html/photographythailand/Forum/Sources/Subs.php
868


Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 12, 2007, 07:50:09 PM
I just tried putting in my Google Adsense code and does not work either  :(

I am wondering if it is theme related? I am using Themis.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: bigguy on June 12, 2007, 07:55:08 PM
Have you done the manual edits for that theme. ??? switch to default and see if the ads show.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 12, 2007, 08:05:50 PM
Yes, thank you, it is a theme issue as the ads show with the default theme.

What change would you think I need to make to the theme possibly to get it to work?

Also, I noticed when I added the Ad under Ad Management it created two entries for the ad.

I thought maybe it didn't matter, but it does as it displays the ad twice in a row as a result. I deleted the ad and added it again, but it again created two ad entries for the same ad.

Not sure why this is happenning either, but obviously it is not a good thing as the ads will show in a repetitive way.

Thank you BigGuy.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: bigguy on June 12, 2007, 08:13:34 PM
It duplicates because some of the edits are in twice. Check the index.php file in the ROOT of your SMF install and remove any duplicate code. In the "Theme Support" board stickied to the top is a list of all the edits for every ad mod. Pick the version of the ad mod you have and edit ONLY the template files in the theme you are using.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 12, 2007, 08:22:23 PM
Thanks again BigGuy. I will check the index.php file for duplicates.

Is this the sticked post you are referring to?

http://www.smfads.com/forums/index.php?topic=22.0

Just not sure which specific post to refer to for the Themis theme. Thanks!
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: bigguy on June 12, 2007, 08:26:12 PM
I would imagine you are using the newest version of the ad mod and SMF 1.1.2 correct. ??? If so check this sticky out:

http://www.smfads.com/forums/index.php?topic=475.0

If the ad mod is installed all you have to do is edit the template files listed in that stickie. :)
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 12, 2007, 08:36:50 PM
Yes, thanks. I am running 1.1.2 on SMF and 2.3 on SMF Ads. Will have a look at that sticky post.

I edited the index.php file and there were 3 or so duplicate code references to ads., which I removed. This got rid of the duplicate ad entry when I add an ad.

The ad however still displays on forum pages in duplicate when testing with the default theme?


Title: Re: Question On Displaying JPG or GIF Banners?
Post by: bigguy on June 12, 2007, 08:46:07 PM
So there is obviously duplicate code in one of these 4 files:

MessageIndex.template.php
Display.template.php
BoardIndex.template.php
index.template.php
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 12, 2007, 08:53:26 PM
Thanks. Will check the other files for dulicate code as well. What a process this is turning out to be  :'(

I started going through the code edits in that thread you gave me. I made it through the index.php and subs.php files and made the indicated changes. In some cases the code you said to ad was there, but it appeared after the code and so I moved it to the before position as indictaed. Is this what I should be doing on those instances where the code to be added appears after the code it should be positioned before?

Once I got to the index.template.php file I hit a snag unfortunately. I could not find the <body>'; code.

Anyway, seems like I still got a long way to go to make all the code edits  :o
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: bigguy on June 12, 2007, 09:20:58 PM
All you should have to edit is the template files. If for some reason you can't find a part of the code like the:

<body>';

Try searching for:

<body>'

or

<body>

Or body

It will be in there somewhere.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 12, 2007, 09:37:56 PM
Thank you. When you say template files do you mean the files in the Theme directory of the theme I am using?
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: bigguy on June 12, 2007, 09:56:16 PM
any template files will be like this:

name.template.php

they will be in your custom theme folder in your themes directory.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 12, 2007, 10:21:23 PM
Thank you again BigGuy. Unfortunately I am still having trouble finding some of the code references that the template post said to edit including the Body code in the index.template.php file because if you just search for the word body in the file there are many references and hard to know where to add them. I am attaching the 4 php files and I have made the changes I was able to and the others are blank where I was not able to find the referenced code to be edited. When you have an extra quiet moment could you kindly look through the attached files and point me to the code lines in each file I need to edit. many thanks. I think hopefully this should get it all working.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 12, 2007, 10:28:20 PM
Well, the changes I was able to make to those 4 files seem to have had some positive result. Some progress has been made and ads are at least showing on the forum's main page:

http://www.photographythailand.com/Forum/index.php

Unfortunately they still don't come up on any of the other forum pages so I guess those other missing code edits still need to be added.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: bigguy on June 12, 2007, 10:44:42 PM
Not all of the code has to go in. Every bit of the code is another place where the ads can show. I learned awhile ago that the ad mod will work with only part of the template coding. This is why it is working now. When I get a minute I will check it out.
Title: Re: Question On Displaying JPG or GIF Banners?
Post by: MarcBkk on June 12, 2007, 11:01:45 PM
Thanks BigGuy, it is working now on the main page so that is a good thing already as I said. Would be nice though to be able to get ads to display in other pages and sections of the forum becuase, as you know, sometimes people may go directly to threads within the pages of a forum when searching for specific keywords in a search engine.