From Easy PHP Calendar Instructions
Jump to: navigation, search

The standard calendar will display the event titles on the actual calendar.

It is possible to modify the layout of the standard calendar by editing the appropriate CSS for the theme that is in use.

To display the standard calendar, insert the following code where the calendar should appear:

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.

Changing the Event Title Layout Style

To change the default event title layout style of the standard calendar, add the variable below just before the require command as shown above (this example variable will mimic the default behavior):

$epcTitleBlock = "<span class=[catColor]>&nbsp;&nbsp;</span><strong> [startTime]</strong> [eventTitle]";

This variable can be modified to fit specific needs. The example below will set the background color for the entire event title instead of just a box to the left:

$epcTitleBlock = "<span class=[catColor]><strong> [startTime]</strong> [eventTitle]</span>";

Just be sure to close any HTML tags and include the category color [catColor] and event title [eventTitle] areas if those are to be displayed.

Also available is [eventTime] which will dispaly both the start and end time of events instead of just the start time.

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