PDA

View Full Version : If no featured show ads


djtheropy
06-24-2006, 03:00 PM
this is just something i have in place on one of my directories so thought i would share with everyone else.

what it does is if there is no featured link for the selected category it will show an ad of your choice instead.
(Demo of cat with feat. link -> here (http://www.justanotherlink.com/d/Internet/Directories/Paid/))
(Demo of cat with ad instead -> here (http://www.justanotherlink.com/d/Internet/SEO/Companies/))

firstly create a new template file (i named mine google-feat.tpl) in this file place the code for your ads (if using adsense a leaderboard ad is best)

then open up main.tpl and edit the template as follows (note: the way the following is laid out might be different in the template you are using)

look for the following;
Content visible to registered users only.
now before the {/if} and in;
Content visible to registered users only.
it should look similar to;
Content visible to registered users only.

Steven Myers
06-24-2006, 03:10 PM
This is VERY cool, thank you for sharing this with us!

Is this compatible with 3.04+ ? I'll test it in a bit and reply a post, but if you can supply some info that would be great.

Excellent Job!

djtheropy
06-24-2006, 03:53 PM
Content visible to registered users only.
im currently using it with 3.0.5, but aslong as the template allows {else} statements it should work.

also im using something similar with phpLD 2 so im sure it should work.

imranbaig
06-30-2006, 09:11 PM
nice one thank you, going to include this in next 3.05 template.

CyberGrenade
07-06-2006, 06:46 PM
Great MOD. I have implemented it on my site. Thanks for posting it.

Jama62
07-07-2006, 09:02 AM
could I make a random ad with this? If so, how to implement please.

djtheropy
07-07-2006, 03:54 PM
Content visible to registered users only.

you could if you had a script that rotates ads installed on your server (such as phpadsnew (http://phpadsnew.com/two/))

you would replace the adsense code with the code generated by the rotate ad script.