Understanding phpicalendar

From PHPicalWiki

Jump to: navigation, search

Contents

[edit] For Developers and Hackers

These pages are documentation for the internal workings of phpicalendar.

[edit] Basic Flow

Most links in phpicalendar call a display script, such as day.php, week.php, month.php, year.php or print.php. The index.php chooses which of these to redirect to. Each of these scripts follows a basic program flow:

  • Initialization: the base scripts call ical_parser.php. The first thing ical_parser.php does is a series of initialization steps. This involves loading all needed functions, and loading variables with values that determine what the user will see.
  • Master array: after completing initialization, ical_parser.php uses its ics parser to populate a Master array with event info.
  • Page assembly: Each base script then creates a Page object using a template file, and replaces Template tags with content to generate the displayed HTML

[edit] Generating RSS feeds

The first steps are similar, but then rss.php assembles the RSS feed without using the templating system.

[edit] Misc

  • Publishing: The phpicalendar distribution includes two scripts for publishing on non-WebDAV servers. While these are provided, they are not well supported by the developer team, due to the wide variation in client/server configurations that we cannot test.
  • CalDAV: CalDAV is an extension of WebDAV. It lets multiple clients edit calendars at the same time