function JEventsLatest(&$params) { global $my, $mainframe; // get global configuration object $jevents_config =& EventsConfig::getInstance(); $this->gid = $my->gid; // Can't use getCfg since this cannot be changed by Joomfish etc. $this->lang = $mainframe->getCfg('lang'); //$this->lang = $mainframe->getLanguage(); $this->modparams =& $params; // get params exclusive to module $this->inccss = $params->get('modlatest_inccss', 0); // get params exclusive to component $this->com_starday = intval($jevents_config->get('com_starday', 0)); // get params depending on switch if (intval($params->get('modlatest_useLocalParam', 0)) == 1) { $myparam =& $params; } else { $myparam =& $jevents_config; } $this->maxEvents = intval($myparam->get('modlatest_MaxEvents', 15)); $this->dispMode = intval($myparam->get('modlatest_Mode', 0)); $this->rangeDays = intval($myparam->get('modlatest_Days', 30)); $this->norepeat = intval($myparam->get('modlatest_NoRepeat', 0)); $this->displayLinks = intval($myparam->get('modlatest_DispLinks', 1)); $this->displayYear = intval($myparam->get('modlatest_DispYear', 0)); $this->disableDateStyle = intval($myparam->get('modlatest_DisDateStyle', 0)); $this->disableTitleStyle = intval($myparam->get('modlatest_DisTitleStyle', 0)); $this->linkCloaking = intval($myparam->get('modlatest_LinkCloaking', 0)); $this->customFormatStr = $myparam->get('modlatest_CustFmtStr', ''); if ($this->dispMode > 4) { $this->dispMode = 0; } // $maxEvents hardcoded to 150 for now to avoid bad mistakes in params if ($this->maxEvents > 150) { $this->maxEvents = 150; } }
return ''; } } } global $mosConfig_offset, $mosConfig_lang, $mosConfig_debug, $mainframe; // setup for all required function and classes $file = mosMainFrame::getBasePath() . 'components/com_events/includes/modutils.php'; if (file_exists($file)) { include_once $file; } else { die("Events Calendar\n<br />This module needs the Events component"); } // load language constants EventsHelper::loadLanguage('modcal'); // get configuration object $cfg =& EventsConfig::getInstance(); global $modparams; $modparams = mosParseParams($module->params); // default values if module paramaters have not been explicitly set if (!isset($modparams->minical_showlink)) { $modparams->minical_showlink = 0; } if (!isset($modparams->inc_ec_css)) { $modparams->inc_ec_css = 1; } if ($mosConfig_debug) { echo 'PARAMS "' . $modparams . '"<br />'; print_r($modparams); } if (!isset($modparams->displayLastMonth)) { // get com_event config parameters for this module