Event Manager startup at current month


The Event Manager by default opens with the previous, current and next months events displayed. If you would like to have it open displaying the current month and the next two months (no previous month), add the code below to the calendar/events/headerCustom.inc.php file:

<?php
// THE CODE BELOW WHEN INSERTED INTO THE
// calendar/events/headerCustom.inc.php FILE WILL
// DISPLAY THE CALENDAR STARTING AT THE
// CURRENT MONTH AND NOT THE PREVIOUS MONTH
if (!$_REQUEST['mo'] && !$mo) {
$mo = date("m");
$yr = date("Y");
$mo++;
if ($mo>12) {
$mo=1;
$yr++;
}
$_REQUEST['mo'] = $mo;
$_REQUEST['yr'] = $yr;
}
?>

هل استفدت من هذا الجواب؟

 أطبع هذا المقال

اقرأ أيضا

Adding a Print Button

To add a print button to your page, insert the following HTML code into your page(s) where you...

Agenda as default Event Manager view

Edit the events/headerCustom.inc.php file (remove the .new from the name if this hasn't been done...

What is the format of the database?

The calendar database field details are below. You can use this as a reference if you want to...

What is the format of the dates in the database?

Julian Day Count http://us3.php.net/manual/en/function.gregoriantojd.php

How do I add a Date Selection Drop-down Menu?

<?php$mo=$_REQUEST[mo];$yr=$_REQUEST[yr];if (!isset($mo) || $mo<1 || $mo>12 ||...