Changing ad banners based on category
Version: 4.0.40
URL: http://sleazeball.net
|
jeffbab
Beginner Usergroup: Customer Joined: Sep 26, 2007 Total Topics: 2 Total Posts: 3 |
Posted 09/27/07 - 10:59 AM:
Hi. Was wondering if anyone knew of a way to display different ads depending on what category the surfer was currently viewing? I use a banner rotating script that I pull ads from. (phpadsnew) It normally just involves placing a little bit of code on the page you want to display the ads on. You create different zones of ads so only relevant ads get displayed where you want them. I can edit the wrapper.tpl to put my banner code in, but then it is going to be displaying the same set of banner ads on every page of the site, no matter what category you are in. Say I had a category called "basketball". I want to be able to display only ads relating to basketball in the category. Normally I would just set up the banners in phpadsnew and then insert the proper code for each category onto whatever page it was needed, but I don't think that can work in this situation because there is really only the wrapper.tpl to edit. Any ideas? Thanks |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 09/29/07 - 3:46 PM:
See http://scripts.webmastersite.net/w...onditionals-syntax-69.html and http://scripts.webmastersite.net/w...category-variables-11.html So <IF {CATNAME} is basketball>basketball ads here</IF> (but it's probably better to use id numbers since titles can change). |
|
VintageAgain
Member Usergroup: Customer Joined: Apr 27, 2004 Total Topics: 5 Total Posts: 17 |
Posted 01/05/08 - 9:53 PM:
So if your running 100 Catagories.. and offering 100 seperate banners, 1 per catagory. You'd have to add 100 lines of code, one for each banner code, am I right ? Hummm |
|
Paul
developer Usergroup: Administrator Joined: Dec 20, 2001 Location: Diamond Springs, California Total Topics: 65 Total Posts: 7614 |
Posted 01/07/08 - 7:27 AM:
By that point it makes more sense to get a banner management system, which should allow you to pass some sort of identifier to specify which ad to grab. |
|
||
This thread is closed, so you cannot post a reply.

Print