Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

    • CommentAuthorSimon
    • CommentTimeSep 16th 2009 edited
    Project Admin

    These updated functions are now included in the main download. You can grab them from here (the file to update is "include/output.php").

    Using the functions

    Both the banner and link output functions will still work using the old set of parameters, but will now also accepted an updated "options" parameter, as demonstrated below.

    if(function_exists('oiopub_banner_zone')) {
    $options = array( 'width'=>100, 'height'=>100 );
    oiopub_banner_zone(1, $options);

    This example would display banner ad zone 1, using a custom ad width and height.

    The Options

    Below are a list of all the options you can set using the 2nd argument:

    * position (left, right, center or none)
    * cols (# of columns in the zone)
    * rows (# of rows in the zone)
    * width (of an individual ad)
    * height (of an individual ad)
    * spacing (between ads, banners only)
    * title (of the ad zone)
    * echo (true or false)
    * empty (number of empty slots to display)


    You can use any of the options with javascript as well. The title option will be stripped of any html when using javascript, to prevent xss attacks.

    The equivalent javascript for the php example above would look like this:

    <script type="text/javascript" src="http://mysite.com/oiopub-direct/js.php?type=banner&zone=1&width=100&height=100"></script>

    Wordpess Widgets

    If you're showing an ad zone in your blog's sidebar using a Wordpress widget, you'll not be able to use these extra options using the default OIO widgets. Instead, download this plugin (which lets you use php in your widgets) and then use the php output code above.

    Need help?  Quick start guide | Troubleshooting | All help topics

    Thanks for implementing those changes! It works perfectly. :)

    Need help?  Quick start guide | Troubleshooting | All help topics