Gossamer Forum
Home : Products : Links 2.0 : Customization :

Category-Specific Webadverts

Quote Reply
Category-Specific Webadverts
I'm almost done setting up Webadverts on my site:

General Adverising - non-targeted banner spots on Home page, What's Cool page and What's New page.

Search Advertising - targeted banner spots on search pages as a function of search terms.

Category Advertising - semi-targeted banner spots on category pages.

The problem is the latter (Category Advertising spots). I revised the site_html_category subroutine in the site_html.cgi script to insert the particular SSI code depending on the category. For example:

if ($dir eq "Specific Category") { $output .= qq~<!--#exec cgi="/scripts/banners/catads01.cgi"-->\n\n~;}

Problem is what variable to use for $dir to test the condition?

Dan Smile
Quote Reply
Re: Category-Specific Webadverts In reply to
Actually a better way is the following code:

$cat_num = ????;
$output .= qq~<!--#exec cgi="/scripts/banners/catads$cat_num.cgi"-->\n\n~;}

But I'm lost in the complexity of the Links code to know what variable to insert for ????.

Dan Smile
Quote Reply
Re: Category-Specific Webadverts In reply to
Hi Dan,

It seems like you are going to alot of trouble with this. Why don't you just use the header field in categories to put in the ssi command?

Just a thought,
Vickie
Quote Reply
Re: Category-Specific Webadverts In reply to
Since the Category name is used to create the directories (they are the same), wouldn't $dir be the name of the category ($category_name)? Or am I misunderstanding something?
Quote Reply
Re: Category-Specific Webadverts In reply to
If you are using templates, go to the FAQ area where you can make category templates and do your direct adverts and other category specific info. Has been a cool new thing they added.
If not using templates, then header/footer area might make things a bit easier Smile
Good luck...