params = null; $module->module = $tmp; $module->id = 0; $module->user = 0; } } } // get the user and configuration object $user =& JFactory::getUser(); $conf =& JFactory::getConfig(); // set the module content if (!is_null($content)) { $module->content = $content; } //get module parameters $mod_params = new JParameter( $module->params ); $contents = ''; if ($mod_params->get('cache', 0) && $conf->getValue( 'config.caching' )) { $cache =& JFactory::getCache( $module->module ); $cache->setLifeTime( $mod_params->get( 'cache_time', $conf->getValue( 'config.cachetime' ) * 60 ) ); $cache->setCacheValidation(true); $contents = $cache->get( array('JModuleHelper', 'renderModule'), array( $module, $params ), $module->id. $user->get('aid', 0) ); } else { $contents = JModuleHelper::renderModule($module, $params); } return $contents; } }