Blocks for multiple ad groups
| Project: | Advertisement |
| Version: | 6.x-2.1 |
| Component: | ad module |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
I'm a little lost on creating a block that can display multiple groups.
I have two groups I want to show in a block, one ad at a time. One is my ROS Skyscraper and the other is Community Skyscraper. I want this block to show on my Community page. This way when I am out of ads that have been sold specifically for Community, the ROS ads will also be shown.
ROS Skyscraper is group 24 and Community is group 436. I have a block with the following PHP Code...
<?php print ad('24,436'); ?>
When I use this, it shows ads that were sold ROS. If I reverse the groups, '436,24'... it shows no ads at all. Am I missing the way this was intended to be used, or am I screwing up the code?
I'm really lost here on the proper way to show two groups in one block.

#1
#2
It's not clear to me: are you trying to show one ad from each groups at all times? Or are you trying to show one ad from either of the groups? The former will requires calling ad() twice, once for each group. The latter requires calling ad() once, passing in both groups as you've done.
The order that you pass in ad groups shouldn't affect anything. Are you sure there are ads in both groups? Try displaying each group independently and confirm that ads display -- if not, follow the directions in documentation/DEBUG.txt to track down why.
#3
I am trying to show one ad from either group in the block. There are ads in each group. I have confirmed that ads from each individual group display, just not when called ad I did above.
#4
Note that I am waiting for you to follow the directions defined in documentation/DEBUG.txt.