magj Posted May 11, 2015 Report Share Posted May 11, 2015 Hi I'm somewhat new to revive but I already use it in basic mode for some of my pages , This is a scenario which I couldn't find a solution for: I have several banner position in one of my pages (namely 6 banners) Is there any method to use a "single invocation code" to display 6 banners out of 30 in every page display? Best Regards Quote Link to comment Share on other sites More sharing options...
Erik Geurts Posted May 11, 2015 Report Share Posted May 11, 2015 Single Page Call (which is what we normally call it) can do this. You might enjoy reading this set of articles: http://www.reviveconsultant.com/articles/single-page-call-in-revive-adserver/ Your topic is addressed in the third one. andrewatfornax 1 Quote Link to comment Share on other sites More sharing options...
billandr Posted June 19, 2015 Report Share Posted June 19, 2015 Actually - I think the question was multiple banners per zone with one call - instead of multiple zones. I know that if you want to call it six times; you can use the spc and pass zones=1|1|1|1|1|1 (6 ones) and that would call it 6 times. Has anyone worked on the adSelect to support multiple banners, in my case - I want ALL the banners for a zone. I've written a module that delivers JSON data so that another front-end can render how it needs to be; but I want it to pull all banners for a zone. Any ideas? Quote Link to comment Share on other sites More sharing options...
billandr Posted June 19, 2015 Report Share Posted June 19, 2015 I have one solution - I modified my ajson.php to do the following: $allAds = MAX_cacheGetZoneLinkedAdInfos ($thisZoneid); $aBannerIds = array_keys($allAds['xAds']); foreach( $aBannerIds as $adId){ $what = "zone:".$thisZoneid.",+bannerid:".$adId; $aBanners[] = MAX_adSelect($what, $campaignid, $target, $source, $withtext, $charset, $context, true, $ct0, $loc, $referer); } This dumps all of the banners for each zone that is passed to the delivery. Quote Link to comment Share on other sites More sharing options...
billandr Posted June 19, 2015 Report Share Posted June 19, 2015 With a little additional work; here is how I can control to present all of them or just some based on a limit parameter: For reference; this is within the foreach of an array of zones being passed - you can see this in most of the delivery files (e.g. ax.php: line 4307) if ( $limit === 0 ){ $allAds = MAX_cacheGetZoneLinkedAdInfos ($thisZoneid); $aBannerIds = array_keys($allAds['xAds']); foreach( $aBannerIds as $adId){ $what = "zone:".$thisZoneid.",+bannerid:".$adId; $aBanners[] = MAX_adSelect($what, $campaignid, $target, $source, $withtext, $charset, $context, true, $ct0, $loc, $referer); } } else { $what = "zone:".$thisZoneid; do { $aBanners[] = MAX_adSelect($what, $campaignid, $target, $source, $withtext, $charset, $context, true, $ct0, $loc, $referer); } while(--$limit > 0); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.