get('cache',0); $cachetime = $params->get('cache_time',0); $output = ''; $cacheparams = new stdClass; $cacheparams->cachemode = 'safeuri'; $cacheparams->class = 'modYahooStyleNewsSlider'; $cacheparams->method = 'getContent'; $cacheparams->methodparams = array($params,$module); $cacheparams->modeparams = array('id'=>'int','Itemid'=>'int'); $output = JModuleHelper::moduleCache ($module, $params, $cacheparams); return $output; }//end function getOutput static function getContent($params, $module){ $output = new stdClass(); $output->content = ''; $output->error = array(); $component = $params->get('component','content'); $modulepath = JPATH_SITE.DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.'mod_yahoostylenewsslider'.DIRECTORY_SEPARATOR; if($component == 'content'){ $filename = $modulepath.'yahoostylenewsslider'.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'content.php'; $com = JPATH_SITE.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_content'.DIRECTORY_SEPARATOR.'content.php'; if(!file_exists($com)){ $output->error[] = 'Content Component is not installed'; }else if(!file_exists($filename)){ $output->error[] = 'Content component support file missing'; }else{ require_once $filename; $output->content = modYahooStyleNewsSliderContent::getItemContent($params, $module); //var_dump(count($output->content)); } }else if($component == 'k2'){ $filename = $modulepath.'yahoostylenewsslider'.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'k2.php'; $com = JPATH_SITE.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_k2'.DIRECTORY_SEPARATOR.'k2.php'; if(!file_exists($com)){ $output->error[] = 'K2 Component is not installed'; }else if(!file_exists($filename)){ $output->error[] = 'K2 component support is only for Premium Version Of the Module'; }else{ require_once $filename; $output->content = modYahooStyleNewsSliderK2::getItemK2($params, $module); } }else{ $output->error[] = 'Selected Component Support has not been added in this version'; } return $output; }//end of getOutput function } //end of class modYahooStyleNewsSlider ?>