[Custom] How to incraise banner limit size

Discussion in 'General Help' started by cajkan, Jul 3, 2012.

  1. cajkan
    • Licensed

    cajkan Active Member

    Hello ive noticed that banners are 100 kbs maximum

    How can i incraise the limit lets say to 150kbs or 200 kbs

    Thank you
  2. Mark Barnett

    Mark Barnett Member

    I think it is in banners.php under sources/user_cp

    Change max_size

    switch ($FORM['mode']) {
    case "1":
    $max_size= "100"; //Regular Banner
    $max_width = $CONF['max_banner_width'];
    $max_height = $CONF['max_banner_height'];
    $bannertype = "{$LNG['user_cp_banner_regular']}";
    case "2":
    define ("MAX_SIZE","50"); //Big Banner
    define ("WIDTH","468");
    define ("HEIGHT","60");
    define ("BANNERTYPE","Big");
    case "3":
    $max_size= "100"; //Premium Banner
    $max_width = $CONF['max_premium_banner_width'];
    $max_height = $CONF['max_premium_banner_height'];
    $bannertype = "{$LNG['premium']}";
    ozguru and cajkan like this.
  3. Basti
    • Staff

    Basti Administrator Staff Member

    Yes, exactly. This is a hardcoded setting, and after some thoughts we decided not to make a admin setting out of it. 100kb is more than enoough for 88x30 button, even for a 160x600 image. Good designer will keep the kb low. This is also to help loading your site fast
  4. Mark
    • Staff

    Mark Administrator Staff Member

    Big banners = slow load time. Slow load time = bad user experience and bad modern SEO. Recommend lowering the limit from 100 down to 50 if your smart ;)
  5. cajkan
    • Licensed

    cajkan Active Member

    Yeah but most gaming websites use Banners wich are GIF and we do this and that

    So i would like to raise up to 120kbs

    but i`ll leave it 100kbs default size

    Thanks for reply guys
  6. Mark
    • Staff

    Mark Administrator Staff Member

    Gif is the best choice for banners :) most professional designers know to keep animated gifs under 50KB because that is the typical maximum size ad networks allow, noob designers will only learn to keep them small if people tell them.
    Anna likes this.
  7. delphoma

    delphoma New Member

    yes it work fine
  8. ozguru
    • Licensed

    ozguru New Member

    can i limit for Regular Banner just .jpg and .png (static) and for allow Premium .gif (animated) Banner ?
    cajkan likes this.
  9. cajkan
    • Licensed

    cajkan Active Member

    Yes that is possible, another option would be to allow JPG, PNG and GIF but then convert to JPG if user is normal, if premium then proceed with GIF.
    So you will avoid errors etc... its better for user experience.

    Anything that you can imagine is possible with PHP :)
  10. Mark
    • Staff

    Mark Administrator Staff Member

    This is not possible with the core Visiolist product, but you could write your own custom code to accomplish this.
  11. Basti
    • Staff

    Basti Administrator Staff Member

    It is possible via a new plugin hook introduced in VL 1.6

    You need to make a plugin, and make file usercp_banner_upload_image_data.php
    In there write
    // Regular disallow gif
    if ($upload_mode == 1 && $extension == "gif") {
      $TMPL['user_cp_upload_errors'] = "<h1 class=\"user_cp_upload_error\">Gif is disallowed for regular users</h1>";
      $errors = 1;
    Mark likes this.

Share This Page