Gossamer Forum
Home : Products : Links 2.0 : Customization :

WebAdverts category details

Quote Reply
WebAdverts category details
Hi
I'd like to know, in webadverts when setting up zones for categories and sub-categories, how can i use zoneA for category XXX and it's subcategories.

Do i have to use this code?
~;
if ($category_name eq "XXX") {
$output .= qq~< !--#exec cgi="/cgi-bin/zoneA.cgi"-- >~;
}
elsif ($category_name eq "XXX/adult") {
$output .= qq~< !--#exec cgi="/cgi-bin/zoneA.cgi"-- >~;
}
elsif ($category_name eq "XXX/video") {
$output .= qq~< !--#exec cgi="/cgi-bin/zoneA.cgi"-- >~;
}
elsif ($category_name eq "XXX/pictures") {
$output .= qq~< !--#exec cgi="/cgi-bin/zone_D.cgi"-- >~;
}
else {
$output .= qq~< !--#exec cgi="/cgi-bin/zoneB.cgi"-- >~; ### default backup
}
$output .= qq~

Or is there an easyer way to tell the script to use zoneA on category XXX and it's subcategories?

Thank you
Quote Reply
Re: WebAdverts category details In reply to
Hi there,

Why not use simply:

if $category_name eq ("A"|"adult"|"video") {
$output .= qq~< !--#exec cgi="/cgi-bin/zone". $category_name .".cgi"-- >~;
}
else
{
$output .= qq~< !--#exec cgi="/cgi-bin/zoneB.cgi"-- >~;

}
Quote Reply
Re: WebAdverts category details In reply to
 
Quote:
Or is there an easyer way to tell the script to use zoneA on category XXX and it's subcategories?

Yes, try this:

Quote:
if ($category_name =~ "XXX")
{ $output .= qq~< !--#exec cgi="/cgi-bin/zoneA.cgi"-- >~; }
$output .= qq~...


------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/
goodstufflists.home.ml.org/




[This message has been edited by Bobsie (edited January 13, 1999).]