function ec_show_events_calendar_html() { include_once EVENTSCALENDARCLASSPATH . DS . "bdpress/header.php"; $calendar = new EC_Calendar(); $month = date('m'); $year = date('Y'); if (isset($_GET['EC_action'])) { $month = $_GET['EC_action'] == 'switchMonth' ? (int) $_GET['EC_month'] : date('m'); $year = $_GET['EC_action'] == 'switchMonth' ? (int) $_GET['EC_year'] : date('Y'); } $calendar->displayLarge($year, $month); }
function filterEventsCalendarLarge() { $calendar = new EC_Calendar(); return $calendar->displayLarge(date('Y'), date('m'), "", array(), 7, false); }
/** * Displays the large calendar in place of the [[EventsCalendarLarge]] short tag. * * @param string $content the content of the page * @return string the content after the tag * @uses ec_strstr() * @uses EC_Calendar */ function filterEventsCalendarLarge($content) { if (preg_match("[EventsCalendarLarge]", $content)) { $calendar = new EC_Calendar(); $ec_match_filter = '[[EventsCalendarLarge]]'; $before_large_calendar = ec_strstr($content, $ec_match_filter, TRUE); $content = ec_strstr($content, $ec_match_filter, FALSE); $calendar->displayLarge(date('Y'), date('m'), $before_large_calendar); } return $content; }