Beispiel #1
0
/**
 * banners module
 *
 * @copyright       XOOPS Project (http://xoops.org)
 * @license         GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
 * @package         banners
 * @since           2.6.0
 * @author          Mage Gregory (AKA Mage)
 * @version         $Id$
 */
function banners_blocks_show($options)
{
    $block = array();
    $xoops = Xoops::getInstance();
    require_once dirname(__DIR__) . '/class/bannerrender.php';
    $render = new BannerRender();
    switch ($options[0]) {
        case 'random':
            $nb_display = $options[1];
            $align = $options[2];
            array_shift($options);
            array_shift($options);
            array_shift($options);
            $client = $options;
            $block['banners'] = $render->displayBanner($nb_display, $align, $client);
            break;
        case 'id':
            $ids = $options[1];
            $align = $options[2];
            $block['banners'] = $render->displayBanner(1, $align, 0, $ids);
            break;
    }
    return $block;
}
Beispiel #2
0
 public static function eventCoreBannerDisplay($args)
 {
     require_once dirname(__DIR__) . '/class/bannerrender.php';
     $render = new BannerRender();
     $args[0] = $render->displayBanner();
 }