Gossamer Forum
Home : Products : Links 2.0 : Discussions :

banner help required please

Quote Reply
banner help required please
Gooday

I have spent hours searching the forums and I can not seem to find an answer to my problem. I have no doubt it is here somewhere -

I have joined 4 different banner exchanges (to target geographically) and would like to have the code from each on four seperate category top pages.

I am using templates and I am simply entering the html code on the index.html page for each category I want the banner to appear on.

When I rebuild the banner code is wiped and I am then having to r-enter the code after each rebuild.

Is it possible to have the banner html code I am using entered on to the category page so it does not get overwritten by the rebuild?

cheers
Quote Reply
Re: banner help required please In reply to
As far as I understand it you want to have a banner exchange code on each category page. And: because there are four different exchanges you want to put a different code on each category.

I've done a similar thing using the header field in the category db and the nested if mod (found in the resource center). When building the pages the script now checks if there's a targeted banner available, if not it places a random banner out of my WebAdverts pool.

To do this is quite simple:

1) Install nested if mod. Pick it up in the resource center. Just cut and paste install. Works perfect.

2) Make some changes in category.def:

In section:
# Database Definition: CATEGORIES
# ---------------------------------
# Definition of your database file.

Change:
Code:
Header => [6, 'alpha', 40, 75, 0, '', ''],

To read:
Code:
Header => [6, 'alpha', '40x3', 500, 0, '', ''],

This will give you a textarea in admin for the header field.
Now you can put the bannerexchange code in each header field for each category.

3) In category.html you put:

Code:
<center>
<%if header%>
<%header%>
<%endif%>
</center>

On the spot where you want your banner exchange code.

In my situation the script displays a banner of my own by adding this code:

Code:
<%ifnot header%>
<%banner%>
<%endif%>

If you do not want to display banners of your own where no exchange banners are available, you do not need the nested ifs mod. Just change the category.def as mentioned and put the if header code in your category.html

I hope this helps,

Jeroen

------------------
Free 4U2: a searchable directory of free stuff
www.free4u2.com

When something does not function properly, hit it hard.....
.....When it breaks it had to be replaced anyway.




[This message has been edited by Jeroen (edited August 14, 1999).]
Quote Reply
Re: banner help required please In reply to
Thanks Jeroen - perfect

Sometimes we just overlook the most simple solutions trying to find an answer that does not exist.

Too much coding and not enough sleeping.....

In your templates make certian the code like this ( not as it cuts and pastes)

<center>
<%if header%>
<%header%>
<%endif%>
</center>

or it will not work
cheers

[This message has been edited by legless (edited August 17, 1999).]

[This message has been edited by legless (edited August 17, 1999).]