From Easy PHP Calendar Instructions
Jump to: navigation, search

Agenda will display events in a list-style format. You can add, edit, modify and remove the templates in the templates directory. These are the templates the list will use to produce its output.

To include the agenda calendar in your web page(s), add the following code where you want the calendar to appear:

$DF = "D - M d"; 
require ("calendar/calendar.php"); 

Replace "calendar/" with the actual path to the calendar directory relative to the directory of your web page.

Note: Always use relative paths. Do NOT use '' in the require command or the calendar will not perform as expected.

Change the $template variable to the name of another template you have created and uploaded to the templates directory.

Change the date format that is produced by altering the $DF variable. Use the same parameters as you would if using the PHP date() function.

Template Options

Adding the codes below in the template will convert them to the variable of the displayed event:


The date that was clicked


The Julian day number of event


Will display a pop-up in a new window for the clicked date/HTML element. Add to the table or tr HTML element as desired.

Other Options

There are other options available to your while using the Agenda style.

Add any of these variables just after $LIST=1;

If none of these options are added, the list will display all of the events for the current calendar month.

$epcListMouseover = "1"; Enables the mouse-over pop-ups for the list. To use this feature, you must add the [mouseover] element to a Agenda template in a table tag (either on the table, tr or td element).

$listDays = x; Lists 'x' number of days from Today.

$listWeeks = x; Lists 'x' number of weeks from Today.

$listMonths = x; Lists 'x' number of months from the currently displayed Month.

$listYear = x; List all of the events for year 'x'.

$listEvents = x; List the next 'x' number of events. You may also want to combine this with $listWeeks = 52; which will show the next 'x' events from today no matter what month is being viewed.

$noOld = x; Setting 'x' to 1 will not show any event older than today, no matter what options were set above. Setting 'x' to 2 will not show any event today and older, no matter what options were set above.

View the examples/mini.php file for an example of how this is used.