Gossamer Forum
Home : Products : Links 2.0 : Customization :

Linkexchange bannercode for each page

Quote Reply
Linkexchange bannercode for each page
Hello again :-) hope you are doing fine and you had a great holiday :-)

My question. I would like to insert a linkexchange banner onto the bottom of each page Links creates... BUT

Linkexchange requires each bannercode to be unique, therefore I am wondering if there is a way to insert
in the template something like:

<showbanner into page <%PAGENUMBER%>>

Where <%PAGENUMBER%> will be replaced by the same number as the name of the page (more1.html, more2.html, etc) contains.

Did you understand what I mean? :-) Any ideas?

Thanx!
Goo

Quote Reply
Re: Linkexchange bannercode for each page In reply to
Is category ID number good enough? If so, you can use similar codes to what I did for my access logs mod...

In nph-build.cgi, sub build_category_pages, find:
Code:
# We set up all the variables people can use in &site_html.pl.
($description, $related, $meta_name, $meta_keywords, $header, $footer) = @{$category{$cat}}[2..7];
replace with:
Code:
($id, $name, $description, $related, $meta_name, $meta_keywords, $header, $footer) = @{$category{$cat}}[0..7];
$le_banner = qq|
(link exchange codes here)
|;
Then put $id in the banner code, like "pageid=$id" or however Link Exchange does it.

Then in site_html_templates.pl, sub site_html_category, find:
Code:
%globals
Add this above it:
Code:
le_banner => $le_banner,
Now in your category.html template, add:
Code:
<%le_banner%>
--Drew