* @link        http://joomlacode.org/gf/project/jevents
 */
/**
 * Library for Latest Events Module
 **/
// following line is to prevent direct access to this script via the url
defined('_VALID_MOS') or die('Restricted access');
// 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 Latest\n<br />This module needs the Events component");
}
// load language constants
EventsHelper::loadLanguage('modlatest');
if (!defined('EVENTS_LATEST_MODULE')) {
    define('EVENTS_LATEST_MODULE', 1);
    function JEventsLatestcmpByStartTime(&$a, &$b)
    {
        // this custom sort compare function compares the start times of events that are referenced by the a & b vars
        if ($a->publish_up == $b->publish_up) {
            return 0;
        }
        if (!isset($a->_startTime)) {
            $a->_startTime = mktime($a->hup, $a->minup, $a->sup);
        }
        if (!isset($b->_startTime)) {
            $b->_startTime = mktime($b->hup, $b->minup, $b->sup);
        }
        return $a->_startTime < $b->_startTime ? -1 : 1;
示例#2
0
            return $content;
        } else {
            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);
}