3

I am looking for a solution to deliver a "wallpaper" banner with the adserver "openx". A wallpaper consists of a leaderboard banner (728x90 px) and a vertical skyscraper. I cant find any option in OpenX itself, so I guess there must be some kind of dirty methods to get it done.

Anyone here having experiences with it? I'm thinking of delivering just an leaderboard banner and then attaching a html snipped to the banner - which contains the markup to my skyscraper-banner... :-/

greg0ire > You can see an example of a "wallpaper" banner on this site (you might experience an overlay banner before, make sure you disable ad blocking extensions): http://www.allocine.fr/ Some days it is in flash, other days it is just a background-image css property set on the body element. I'd like to achieve the second option.

Thanks!

greg0ire
  • 22,714
  • 16
  • 72
  • 101
timoziemann
  • 90
  • 1
  • 5

3 Answers3

1

I got wallpapers ads to work through openx using this method.

First I created a div below the content wrapper of my site (using wordpress, header.php file).

<div id="adbg" style=" margin: 0pt auto; height: 1000px; width: 100%; position: fixed; cursor:pointer;  ">

Then I created a div block with the wallpaper image in the CSS and added it to OpenX as a TEXT BANNER

<div OnClick="location.href='#';" style="background: url('image.jpg') no-repeat scroll center top #026eb4; height: 100%; width: 100%;  margin: 0pt auto; cursor:pointer; "></div>

Finally, I took the openx embed code and place it within the ADBG div I pasted above.

This technique worked well for me on all browsers.

You can of course take the CSS in the adbg div and store it in your CSS file.

Rob Heath
  • 11
  • 1
0

Not sure if this is still of interest, but there's a setting in openX for that called "Companion positioning". Have a look at the OpenX reference guide under point 4.6:

http://opensourceusers.com/sites/default/files/openx_reference_guide.pdf

It's a method to make sure that a skyscraper is delivered every time a certain leaderboard is delivered. You can then use the prepend/append functionality to color the background to turn this "hockey stick" into a full blown wallpaper.

Perrschy
  • 55
  • 9
0

For the moment, I ended up doing this, but I'd like to see better solutions:

<div class="openx_<?php echo $_block->getBlockParameter('css_class');?> openx_background hidden">
 <?php echo str_replace('INSERT_RANDOM_NUMBER_HERE', rand(0, 9000), $_block->getBlockParameter('html', ESC_RAW));?>
  <?php echo javascript_tag()?>
    var checkImg = window.setInterval(function(){
      if (jQuery('.openx_background img').length)
      {
        jQuery("body").css('background', 'url("' + jQuery('.openx_background img').attr('src') + '") no-repeat');
        window.clearInterval(checkImg);
      }
    }, 1000);
    //give up 3 s later
    setTimeout(function(){
      if (jQuery('.openx_background img').length == 0)
      {
        clearInterval(checkImg);
      }
    }, 3001);
  <?php echo end_javascript_tag()?>
</div>

$_block->getBlockParameter('html', ESC_RAW) contains the openx javascript invocation code.

greg0ire
  • 22,714
  • 16
  • 72
  • 101