::. Blog Mode

*Please see the section titled Important. All pages that display the calendar must be correctly formatted and include the proper code before the calendar will appear as intended.

The Blog Mode allows a normal mode calendar and a list mode calendar on the same page and for the list mode is updated by clicking on dates on the normal mode calendar. For example, if the normal mode calendar shows that there is an event on November 24, click on November 24, the page reloads and displays the events just for that day in a list mode style format.

To see an example, view the demoBlog.php file in the root calendar directory.

Adding Blog Mode to a web page:

To add the blog mode to a page requires two separate elements; the normal mode calendar and the list mode calendar, both set to use Blog Mode.

To insert the normal mode calendar:

<?php
$EPCBLOG=1;
require ("calendar/calendar.php");
?>

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

To insert the list mode calendar:

<?php
$EPCBLOG=2;
$template="blog.php";
$DF = "l, F j, Y";
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 'http://www.YourDomainName.com/calendar/calendar.php' in the require command or the calendar will not perform as expected.

Change the $template variable to the name of another blog mode 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. http://www.php.net/date.

View the demoBlog.php file for an example of how this feature is used and implemented.

Copyright © 2001-2009 NashTech, Inc. All Rights Reserved.