I use AP to target my main top-level categories only, as it would be too difficult to target each of my 5000+ cats individually. I setup my regions within AP and then modified nph-build.cgi to match the first few characters of the category 'name' with a specific AP region and assign a 'zone name' for (A)Banners, (B)Buttons, (C)Text. I then pass the 'zones' to the category template and use it in my AP ad call, e.g.;
nph-build.cgi
my ($cname, $zonea, $zoneb, $zonec, $zonename);
$cname = $category_r->{'Name'};
if ($cname =~ /^Anim/) {$zonea="OAA"; $zoneb="OBA"; $zonec="OCA"; $zonename="Animals, etc";}
elsif ($cname =~ /^Arts/) {$zonea="OAB"; $zoneb="OBB"; $zonec="OCB"; $zonename="Arts, etc";}
elsif ($cname =~ /^Busi/) {$zonea="OAC"; $zoneb="OBC"; $zonec="OCC"; $zonename="Busines, etc";}
elsif ($cname =~ /^Care/) {$zonea="OAD"; $zoneb="OBD"; $zonec="OCD"; $zonename="Career, etc";}template category.html
< ! - - # INCLUDE VIRTUAL ="/path/to/banners.pl?region=<%zonea%>&mode=SSI" - - >
</center><p>AP have commented on their website that they're working towards better integration with Links, but there is nothing specific as yet (3.2.5) - I think it's being developed for the next release (3.5) due some time in October.
All the best
Shaun
nph-build.cgi
Code:
# Set the advertising zones based on the category name. my ($cname, $zonea, $zoneb, $zonec, $zonename);
$cname = $category_r->{'Name'};
if ($cname =~ /^Anim/) {$zonea="OAA"; $zoneb="OBA"; $zonec="OCA"; $zonename="Animals, etc";}
elsif ($cname =~ /^Arts/) {$zonea="OAB"; $zoneb="OBB"; $zonec="OCB"; $zonename="Arts, etc";}
elsif ($cname =~ /^Busi/) {$zonea="OAC"; $zoneb="OBC"; $zonec="OCC"; $zonename="Busines, etc";}
elsif ($cname =~ /^Care/) {$zonea="OAD"; $zoneb="OBD"; $zonec="OCD"; $zonename="Career, etc";}
Code:
<center><p> < ! - - # INCLUDE VIRTUAL ="/path/to/banners.pl?region=<%zonea%>&mode=SSI" - - >
</center><p>
All the best
Shaun