Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

  1.  

    I have the banner placed in the sidebar as I want it, my advertisement jpg is 125*125px and that is all I have room for in that sidebar; however the script is adding a spacer around that image making it larger than the sidebar allows for. How do I go about removing the spacing/cell spacing/cell padding that appears around the banner? Thanks!

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeJan 23rd 2008 edited
     
    Project Admin

    This should take care of it. Open up include/output.php and replace the function called oiopub_banner_output with the code below:

    function oiopub_banner_output($args='', $zone=1) {
    global $wpdb, $oiopub_set, $oiopub_misc, $oiopub_module, $oiopub_query, $oiopub_pids;
    if($oiopub_set->enabled == 1) {
    $bz = "banner" . $zone;
    if(empty($oiopub_set->$bz->spacing)) {
    $oiopub_set->$bz->spacing = 5;
    }
    $zone_price = $oiopub_set->$bz->price;
    $zone_cols = $oiopub_set->$bz->cols;
    $zone_rows = $oiopub_set->$bz->rows;
    $zone_iwidth = $oiopub_set->$bz->width;
    $zone_iheight = $oiopub_set->$bz->height;
    $zone_default = $oiopub_set->$bz->idefault;
    $zone_items = $zone_cols * $zone_rows;
    $zone_width = ($zone_iwidth * $zone_cols) + ($oiopub_set->$bz->spacing * ($zone_cols - 1));
    $zone_height = ($zone_iheight * $zone_rows) + ($oiopub_set->$bz->spacing * ($zone_rows - 1));
    if($zone_price > 0) {
    $number = 0; $row = 0;
    echo "<div style=\"width:".$zone_width."px; height:".$zone_height."px; position:relative; margin:auto;\">\n";
    foreach($oiopub_query->banners_outcontent as $b) {
    if(is_array($oiopub_pids)) {
    $oiopub_pids[] = $b->item_id;
    }
    if($b->item_type == $zone && $number < $zone_items) {
    if($oiopub_set->$bz->nofollow == 1) {
    $nofollow = ' rel="nofollow"';
    } elseif($oiopub_set->$bz->nofollow == 2) {
    if($b->item_nofollow == 1) {
    $nofollow = ' rel="nofollow"';
    }
    }
    if($oiopub_module->tracker == 1 && $oiopub_set->tracker_enabled == 1) {
    $url = $oiopub_misc->tracker_url."/go.php?id=".$b->item_id;
    $hide = " onmouseover=\"window.status='" . $b->item_page . "'; return true;\"";
    } else {
    $url = $b->item_page;
    $hide = "";
    }
    $rem_col = ($number + $zone_cols) % $zone_cols;
    if($rem_col == 0) $row++;
    $rem_row = $row - 1;
    $top = $rem_row * ($zone_iwidth + $oiopub_set->$bz->spacing);
    $left = $rem_col * ($zone_iheight + $oiopub_set->$bz->spacing);
    $position = "position:absolute; top:".$top."px; left:".$left."px;";
    echo "<div style=\"border:1px solid #C0C0C0; width:".$zone_iwidth."px; height:".$zone_iheight."px; $position\">\n";
    if(empty($b->item_notes)) {
    echo "<a$nofollow href='".$url."'$hide><img src='".$b->item_url."' width='".$zone_iwidth."' height='".$zone_iheight."' border='0' /></a>\n";
    } else {
    echo stripslashes($b->item_notes);
    }
    echo "</div>\n";
    $number++;
    }
    }
    $empty_places = $zone_items - $number;
    if($empty_places > 0) {
    for($z=1; $z <= $empty_places; $z++) {
    $rem_col = ($number + $zone_cols) % $zone_cols;
    if($rem_col == 0) $row++;
    $rem_row = $row - 1;
    $top = $rem_row * ($zone_iwidth + $oiopub_set->$bz->spacing);
    $left = $rem_col * ($zone_iheight + $oiopub_set->$bz->spacing);
    $position = "position:absolute; top:".$top."px; left:".$left."px;";
    if(!empty($zone_default)) {
    echo "<div style=\"border:1px solid #C0C0C0; width:".$zone_iwidth."px; height:".$zone_iheight."px; $position\">\n";
    echo "<a rel='nofollow' href='".$oiopub_misc->plugin_url."/purchase.php?do=banner&zone=$zone'><img src='".$zone_default."' width='".$zone_iwidth."' height='".$zone_iheight."' border='0' /></a>\n";
    echo "</div>\n";
    } else {
    if(!empty($oiopub_set->buypage)) {
    $buy_url = $oiopub_misc->blog_url . "/" . $oiopub_set->buypage . "/#banner";
    } else {
    $buy_url = $oiopub_misc->plugin_url."/purchase.php?do=banner&zone=$zone";
    }
    echo "<div style=\"border:1px solid #C0C0C0; width:".$zone_iwidth."px; height:".$zone_iheight."px; text-align:center; line-height:".$zone_iheight."px; $position\">\n";
    echo "<a rel='nofollow' href='".$buy_url."'><b>Advertise Here</b></a>\n";
    echo "</div>\n";
    }
    $number++;
    }
    }
    echo "</div>\n";
    }
    }
    }

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

    Thanks :D There's an extra bracket in the end of that code you pasted but when I went through line by line and made the changes to the px sizes in the script it worked just fine, thanks so much!

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