Displaying a smaller banner in an Openx zone

Did you ever want to chain a zone with smaller banners after a zone with big banners in Openx? This sounds like useful feature. We don't live in the 90s anymore where every page had a pixel-precise table layout. The world has learned how to build fluid layouts.

One the Advanced page of the admin pages of a zone, there is this If no banners from this zone can be delivered, try to... setting. Openx should really let me decide which zone I want to pick from the Display the selected zone instead list. I want to see all zones in the list. Yes, there are workarounds, like using *x* sized zones, but why on earth should I create a new zone if I already have one that has exactly the ads I want to display? Well, here's how to change it. If you want to have the full choice, edit /www/admin/zone-advanced.php. In version 2.6.3, simply add the following line after line 230:

$allowothersizes = true;

Now, you get the full list in the dropdown.Here's a little more context:

--- zone-advanced-orig.php      2009-02-02 07:46:45.000000000 +0100
+++ zone-advanced.php   2009-01-21 15:22:04.000000000 +0100
@@ -228,6 +228,7 @@
     $doZones = OA_Dal::factoryDO('zones');     $allowothersizes = $zone['delivery'] == phpAds_ZoneInterstitial || $zone['delivery'] == phpAds_ZonePopup;
+       $allowothersizes = true;
     if ($zone['width'] != -1 &amp;&amp; !$allowothersizes) {
         $doZones-&gt;width = $zone['width'];

Kind of funny that this setting exists but isn't exposed anywhere in the UI... Yes, it's a quick hack, so test it before running it on anything in production. Works for me though.


Start a new thread

Cancel reply
Markdown. Syntax highlighting with <code lang="php"><?php echo "Hello, world!"; ?></code> etc.