Gossamer Forum
Home : Products : Links 2.0 : Customization :

Category ID on cotegory page

Quote Reply
Category ID on cotegory page
I'm a member of a banner exchange service. I can put banners on every page. If the pagenum of the banner is different then i get an extra credit. I want to match the pagenum of the banner with the category id thats in the categories.db file. In that way the pagenum are always different and i get the maximum result in banner credits. Have anyone an idea how to do this?
Quote Reply
Re: Category ID on cotegory page In reply to
Sounds like link exchange..

I was on the same thing and for ease what I did was created a random number gernerator to input the page number in the html script. I generated a random number from 1 to 1 billion (little chance of a match. I then used $random as the page number within the script when the pages were built. Should be a really easy script to recreate.

Bob Wirth
Quote Reply
Re: Category ID on cotegory page In reply to
I did it a bit differently. In the site_html_category routine in site_html.pl (v1.1 or v2.0) or site_html-templates.pl (v2.0), I put the following:

Quote:
my $CatNbr = $category{$category_name}[0] + 10;

This returns the category ID number and adds 10 to it (10 representing one more than the number of menu options, including the home page, that I have available). I can use $CatNbr inside the Link Exchange code to represent the directory. In the non-category pages, I just put:

$CatNbr = xxx

where "xxx" represents the menu item. For example, 1 for the home page, 2 for the New page(s), 3 for the Cool page, etc., up to 9. Of course, for those pages, you could just as easily hard-code the number in the LE code.

It works for me!

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/


[This message has been edited by Bobsie (edited February 18, 1999).]
Quote Reply
Re: Category ID on cotegory page In reply to
Thanks Bobsie,

That was exactly what i wanted.
I use the hyperbanner Network (BTW).
It worked just fine.