Osclass Support Forums

Osclass plugin support => Banners & Advertisement Plugin => Topic started by: Luka93 on June 13, 2022, 10:53:14 PM

Title: Some ideas to improve plugin
Post by: Luka93 on June 13, 2022, 10:53:14 PM
Hello OsClass team!

I bought this plugin a long time ago and use it only to manage banner snippets for other more complex ad servers (like Revive or Google Ad Manager and Adsense) because it lacks some very essential functions. Yet, the plugin offers excellent banner delivery rate compared to other third party systems, so it would be nice to add some more functions so it would be usable as a stand alone plugin also for more advanced users. And maybe make more sales / licence renew purchases on your market ;)

Here are some ideas to improve plugin to be more usable also for more advanced users:

Very simple yet essential:
- add CTR ratio (clicks / views) to stats column
- add new column with stats of CPM (cost per 1000 impressions) and CPC (cost per click) to admin columns
- add advert start date (in addition to existing advert expiration date)
- add new column with advert start and end date to admin columns  
- display all values listed above also on user frontend stats page (/advertisement-preview/)
- add simple text field for internal commenting of advert (on advert edit page) - so admin can makes notes like who ordered advert and others things- make admin columns sortable (as much as possible - also values like CTR, CPM, ..., Expiration date, ..., Status, ...)

More advanced - set max. daily spend as explained below
This is very important for classifieds with high traffic - if I get an order for 50€ and set CPM 1,5€ (cost per 1.000 views), the budget will be spent in a few hours or maybe minutes.
Advertiser would probably not even saw their ad if he would not check my site fast enough :-) 

In this case I could set max. daily spent on 10€, so the campaign will last for 5 days. But the solution is not as simple. Also the daily budget should be distributed evenly through the day (or else the budget will be spent in the first few hours of the day).

I think that other professional ad servers like Revive or Google Ad Manager solve this with analysing traffic and make forecasting which is ofcourse too complex to include into 30€ plugin.

The optimal user value / developing cost may be, that plugin would allow admin to set:
- max daily spend
- max hourly spend
- max minute spend

Thank you if you will consider some of the ideas for future updates!

Regards
Title: Re: Some ideas to improve plugin
Post by: MB Themes on June 14, 2022, 10:03:23 AM
@Luka93
Thanks for feedback, will put it on list!
Title: Re: Some ideas to improve plugin
Post by: Luka93 on June 19, 2022, 12:29:35 AM
@Luka93
Thanks for feedback, will put it on list!

Thanks for consideration!
Title: Re: Some ideas to improve plugin
Post by: VS on June 17, 2023, 11:39:44 PM
This also can be used on banner , but i have problem with coding that. 
Can support or someone help?
I need that message if banner empty.

Quote
// SHOW BANNER AND ITS ADVERTS
function ba_show_banner($id) {
  $banner = ModelBA::newInstance()->getBanner($id);
  $adverts = ModelBA::newInstance()->getAdvertByBannerId($id);

  if (empty($adverts)) {
    return 'No adverts available for Banner ID ' . $id . '.';
  }

  $count = count($adverts);
  $rand = rand(1, $count);
  $i = 1;
  $html = '<div class="ba-banner' . ($banner['i_type'] == 2 ? ' ba-slide' : '') . '" data-banner-id="' . $id . '" ' . ($banner['i_type'] == 2 ? 'data-slide-count="' . $count . '"' : '') . '>';

  foreach($adverts as $a) {
    if(($banner['i_type'] == 3 && $i == $rand) || $banner['i_type'] <> 3) {
     
      if($banner['i_type'] == 2 && $i == 1) {
        $slide_class = ' active';
      } else {
        $slide_class = '';
      }

      $html .= '<div class="ba-advert' . $slide_class . '" data-advert-id="' . $a['pk_i_id'] . '" style="' . ($a['s_size_width'] <> '' ? 'width:' . $a['s_size_width'] . ';' : '') . ($a['s_size_height'] <> '' ? 'height:' . $a['s_size_height'] . ';' : '') . '" ' . ($banner['i_type'] == 2 ? 'data-slide-id="' . $i . '"' : '') . '>';

      if($a['s_url'] <> '' && $a['i_type'] <> 3) {
        $html .= '<a href="' . osc_base_url(true) . '?baAdvertId=' . $a['pk_i_id'] . '&baAdvertRedirect=' . urlencode($a['s_url']) . '" target="_blank">';
      }

      if($a['i_type'] == 2) {
        $html .= '<img class="ba-advert-image" src="' . osc_base_url() . 'oc-content/plugins/banner_ads/img/advert/' . $a['s_image'] . '"/>';
      } else {
        $html .= $a['s_code'];
      }

      if($a['s_url'] <> '' && $a['i_type'] <> 3) {
        $html .= '</a>';
      }

      $html .= '</div>';

      if(!osc_is_admin_user_logged_in()) {
        ModelBA::newInstance()->updateViews($a['pk_i_id']);
      }
    }

    $i++;
  }

  $html .= '</div>';

  return $html;
}
Title: Re: Some ideas to improve plugin
Post by: VS on June 19, 2023, 10:27:11 PM
Why don't you reply to posts?