示例#1
0
 /**
  * @return RokCommon_Request
  */
 public static function &getInstance()
 {
     if (!isset(self::$_instance)) {
         self::$_instance = new RokCommon_Request();
     }
     return self::$_instance;
 }
$passed_params->showcase_autoplay_delay = $params->get('showcase_autoplay_delay', 7) * 1000;
$passed_params->showcase_captionsanimation = $params->get('showcase_captionsanimation', 'crossfade');
$passed_params->moduleid = $module->id;
$passed_params->layout_context = 'mod_rokgallery.' . $passed_params->layout;
$passed_params->style_context = $passed_params->layout_context . '.' . $passed_params->style;
$request_var_root = 'mod_rokgallery.' . $passed_params->layout;
$request_var_css = $request_var_root . '.css';
$request_var_js = $request_var_root . '.js';
if (!RokCommon_Request::get($request_var_css, false)) {
    $doc =& JFactory::getDocument();
    if (file_exists(RokCommon_Composite::get($passed_params->layout_context)->get($passed_params->layout . '.css'))) {
        $doc->addStyleSheet(RokCommon_Composite::get($passed_params->layout_context)->getURL($passed_params->layout . '.css'));
    }
    if (file_exists(RokCommon_Composite::get($passed_params->style_context)->get('style.css'))) {
        $doc->addStyleSheet(RokCommon_Composite::get($passed_params->style_context)->getURL('style.css'));
    }
    RokCommon_Request::set($request_var_css, true);
}
if (!RokCommon_Request::get($request_var_js, false)) {
    $doc =& JFactory::getDocument();
    if (file_exists(RokCommon_Composite::get($passed_params->layout_context)->get($passed_params->layout . RokGallery_Helper::getJSVersion() . '.js'))) {
        $doc->addScript(RokCommon_Composite::get($passed_params->layout_context)->getURL($passed_params->layout . RokGallery_Helper::getJSVersion() . '.js'));
    }
    RokCommon_Request::set($request_var_js, true);
}
if (file_exists(RokCommon_Composite::get($passed_params->layout_context)->get('javascript.php'))) {
    $doc->addScriptDeclaration(RokCommon_Composite::get($passed_params->layout_context)->load('javascript.php', array('passed_params' => $passed_params)));
}
$rokgallerymodule = new RokGalleryModule();
$passed_params->slices = $rokgallerymodule->getSlices($params);
require JModuleHelper::getLayoutPath('mod_rokgallery');