I'm trying to figure out how to display a "support comes from" box around an ad group's display, and only want the "support comes from" box to be visible if the

<? print ad(groupnum, adnum) ?> doesn't return an empty set--this seems like it would be a simple thing, but I don't know what I'm looking for the ad function to return (if all ads in that group have expired or are pending, approved, etc).

Any hints or suggestions would be greatly appreciated! Many thanks. -derrick.

Comments

jeremy’s picture

Status: Active » Fixed

If (adserve_variable('error') === TRUE), no ads were displayed. If (adserve_variable('error') !== TRUE), ads were displayed. You can check this in hook_cache_exit_text().

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

rjdjohnston’s picture

Status: Closed (fixed) » Active

Can this be expanded to check by specific group? I have two groups displaying on the same page, the adserver_variable error does not return true because another group is displaying.

When I check for active ad with ad(55,1) this returns true, but the ad no longer displays.

john franklin’s picture

Status: Active » Closed (won't fix)

Closing out all bugs for 5.x and older versions of Drupal. If this is still an issue, please reopen and update with 6.x details.