Forum OpenACS Q&A: Ad Server module...getting Groups to work.

Hi all,

I was wondering if anyone has had luck with the ad server module?
I've created a group and put three ads (scorecard, yahoo and excite)
in it. But only the scorecard.org ad shows up. When I remove the
scorecard ad, the Yahoo ad shows up, but that's it.

I think I'm not calling the groups correctly, but I can't figure out
from the "docs" what should work.

This is the normal reference:
<a href="/adserver/adhref.tcl?adv_key=pfizer">
<img src="/adserver/adimg.tcl?adv_key=pfizer">
</a>

And this is what the docs say regarding groups:
"The page need only call adv_ad_from_group with the group_key as an
argument and it will get back a reference to the next appropriate ad
from that group."

So I was assuming that the reference should read something like:
<a href="/adserver/adhref.tcl?adv_ad_from_group... but then what?

Thanks,

Scott

p.s. if you want to see the test, go to http://www.royal.com/test/

Collapse
Posted by Roberto Mello on
If you use "<a href="/adserver/adhref.tcl?adv_ad_from_group" then you'll only get one ad. What you have to do is call a (poorly documented) Tcl procedure that will serve ads from a group.

I found the procedure by digging through the adserver-defs code. Here's what I have in the ADP tag I call from all my pages (see http://fslc.usu.edu):

adserver_get_ad_html community

Where "community" is the group I defined for my ads. It returns the img src and href tags ready to be inserted or output.

Thanks Roberto,

That's the same code I'm using at Royal, but it's not working. I'm wondering if we're running different versions of ACS? What build is your club site?

Thanks,

Scott

Collapse
4: Got it... (response to 1)
Posted by Scott Mc Williams on
Yep, that was the answer. We had an older version running. Missed the fix by a hair. It's all cruising now, though.

Thanks for your help!

Scott

Have you guys had the adserver up and running for acs v4.2?? I really need this module now .. and would love for some pointers .. before even attempting a port. ;)

Kindest,
Jørgen Skogstad