Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

    • CommentAuthoronpulseim
    • CommentTimeJan 1st 2008
     

    Hi All,
    I have setup my new blog, www.ViralKing.com and have just added the plugin. The issue for me is, how do I add custom section, I mean what code do I use to add custom to the site. Also how can you create more than 1 banner zone?

    Thanks in advance

    VK

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

    Once the custom settings are configured, a "custom" option will appear on the purchase.php page. A direct link to it would be:

    http://www.viralking.com/wp-content/plugins/VK-Ads/purchase.php?do=custom

    There is only 1 banner zone available right now. I originally wanted to have multiple zones from the start, but in the end opted to create one, and extend it later. It's on my list of things to do before v1.5 comes out (no set timeline).

    Btw, have you had any trouble with CSS styling on this forum when logging in? I've had a few people say it vanished, but have never had it happen to me.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthoronpulseim
    • CommentTimeJan 2nd 2008
     

    Simon,
    no i havent, all looks good here. Ok mate, so how do I assign where I want my custom banner ad to show up on my blog? What code do I use to put that in?

    also, a seperate question is, how can i edit the output of available ads, as right now it's formatting looks messy (Please see the sidebar on my site: http://www.ViralKing.com ) Thanks for all your support

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

    There is no code to assign, because custom purchses (unless its a digital download) are handled completely manually. I added the feature in because a few people asked me if they could sell other services, not just relating to blog ads.

    I'd recommend handling the custom banner purchase placement manually intially, until I put in multiple banner zone support.

    The available ads code can be found in include/output.php - search for the function oiopub_open_slots. I've also put up a new version, which should look better by default:

    //display open stats
    function oiopub_open_slots() {
    global $wpdb, $oiopub_set, $oiopub_misc, $oiopub_openslots;
    if(!$oiopub_openslots) {
    if($oiopub_set->posts_total > 0) {
    $posts = true;
    }
    if($oiopub_set->linkhome_price > 0) {
    $linkhome_total = $oiopub_set->linkhome_max;
    $linkhome = true;
    }
    if($oiopub_set->linksite_price > 0) {
    $linksite_total = $oiopub_set->linksite_max;
    $linksite = true;
    }
    if($oiopub_set->inline_total > 0) {
    $inline_total = $oiopub_set->inline_rotator;
    $inline = true;
    }
    if($oiopub_set->banners_total > 0) {
    $banners_total = $oiopub_set->banner1_cols * $oiopub_set->banner1_rows * $oiopub_set->banner1_rotator;
    $banners = true;
    }
    $items = $wpdb->get_results("SELECT item_channel,item_type FROM ".$oiopub_misc->dbtable_purchases." WHERE item_status<'2' AND item_channel IN(2,3,5)");
    foreach($items as $i) {
    if($i->item_channel == 2) {
    if($oiopub_set->linkhome_price > 0 && $linkhome_total > 0 && $i->item_type == 1) {
    $linkhome_total--;
    }
    if($oiopub_set->linksite_price > 0 && $linksite_total > 0 && $i->item_type == 3) {
    $linksite_total--;
    }
    } elseif($i->item_channel == 3) {
    if($oiopub_set->inline_total > 0 && $inline_total > 0) {
    $inline_total--;
    }
    } elseif($i->item_channel == 5) {
    if($oiopub_set->banners_total > 0 && $banners_total > 0) {
    $banners_total--;
    }
    }
    }
    $output = '';
    if($posts == true) {
    $output .= "<li><a href='".$oiopub_set->plugin_url."/purchase.php?do=post'>Paid Reviews</a> are available</li>\n";
    }
    if($linkhome_total > 0) {
    $output .= "<li><a href='".$oiopub_set->plugin_url."/purchase.php?do=link'>" . $linkhome_total . "</a> home page link slots open</li>\n";
    } elseif($oiopub_set->linkhome_max == 0 && $linkhome == true) {
    $output .= "<li><a href='".$oiopub_set->plugin_url."/purchase.php?do=link'>Unlimited</a> home page link slots open</li>\n";
    }
    if($linksite_total > 0) {
    $output .= "<li><a href='".$oiopub_set->plugin_url."/purchase.php?do=link'>" . $linksite_total . "</a> site wide link slots open</li>\n";
    } elseif($oiopub_set->linksite_max == 0 && $linksite == true) {
    $output .= "<li><a href='".$oiopub_set->plugin_url."/purchase.php?do=link'>Unlimited</a> site wide link slots open</li>\n";
    }
    if($inline_total > 0) {
    $output .= "<li><a href='".$oiopub_set->plugin_url."/purchase.php?do=inline'>" . $inline_total . "</a> inline post ad slots open</li>\n";
    }
    if($banners_total > 0) {
    $output .= "<li><a href='".$oiopub_set->plugin_url."/purchase.php?do=banner'>" . $banners_total . "</a> banner image slots open</li>\n";
    }
    if(!empty($output)) {
    $oiopub_openslots = "<ul>" . $output . "</ul>\n";
    }
    }
    return $oiopub_openslots;
    }

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