예제 #1
0
defined('_JEXEC') or die('Restricted access');
global $mainframe;
// count instances
if (!isset($GLOBALS['yoo_scrollers'])) {
    $GLOBALS['yoo_scrollers'] = 1;
} else {
    $GLOBALS['yoo_scrollers']++;
}
// include the syndicate functions only once
require_once dirname(__FILE__) . DS . 'helper.php';
// disable edit ability icon
$access = new stdClass();
$access->canEdit = 0;
$access->canEditOwn = 0;
$access->canPublish = 0;
$list = modYOOscrollerHelper::getList($params, $access);
// check if any results returned
$items = count($list);
if (!$items) {
    return;
}
// init vars
$style = $params->get('style', 'default-v');
$module_width = $params->get('module_width', 400);
$module_height = $params->get('module_height', 200);
$slide_size = $params->get('slide_size', 200);
$slide_interval = $params->get('slide_interval', 3000);
$scrollbar = 1;
/* 0: hide, 1: show, currently only show supported*/
$autoplay = $params->get('autoplay', 1) ? 'true' : 'false';
$module_base = JURI::base() . 'modules/mod_yoo_scroller/';