Random Banner

Discussion in 'Subrion CMS Plugins Discussion' started by ChristiansfeldNet, Dec 24, 2016.

  1. ChristiansfeldNet

    ChristiansfeldNet New Member

    Any one know if there is an easy fix to make the Banner plugin show banners randomly?
  2. Dayir_A.

    Dayir_A. Staff Member


    There is no way to do it via functionality, but you can get banners in random order by editing file:


    Find line:

    $rows = $this->iaDb->all(iaDb::ALL_COLUMNS_SELECTION, "`status` = 'active'", null, null, self::getTable());
    and change it with:

    $rows = $this->iaDb->all(iaDb::ALL_COLUMNS_SELECTION, "`status` = 'active' ORDER BY RAND()", null, null, self::getTable());
    Let us know how it goes for you.

    Andrew_G. likes this.
  3. ChristiansfeldNet

    ChristiansfeldNet New Member

    It's perfect, thank you very much :)
  4. Dayir_A.

    Dayir_A. Staff Member

    You are always welcome.

Share This Page