Banner URL without mandatory. Is it possible? How can I change the code?

Discussion in 'Subrion CMS Plugins Discussion' started by olairmarcos, Dec 26, 2013.

  1. olairmarcos

    olairmarcos Member

    Hello. Is there an easy way to change the plugin code banner so that it is not mandatory to enter the URL for the banner? Sometimes we create a banner without a defined URL and do not need the banner is clicked. Being able to show banners without URL is in many cases necessary. Thank you for your help.
  2. Gleb_S.

    Gleb_S. Subrion Designer Staff Member

    Hi @olairmarcos !

    We will add this feature later. You can track progress here: http://dev.subrion.com/issues/1346

    Right now you can do this:
    1. Open up this file: root/plugins/banners/admin/index.php
    2. Around line 390 find this code:
    Code (Text):
    if (!iaValidate::isUrl($banner['url']) && 'html' != $banner['type'])
    {
      $error = true;
      $messages = iaLanguage::get('banner_url_incorrect');
    }
    And comment it or remove.

    Now URL will not be checked when saving banner.

    Thanks!
  3. olairmarcos

    olairmarcos Member

    Thanks for the reply. I'll try to not make the clickable banner. Clicking the banner opens a new blank window.
    I will wait for the new version of the plugin. Good job.

Share This Page