| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: calendar-view-ical.tpl.php,v 1.1.2.5 2010/11/21 12:25:12 karens Exp $ 3 /** 4 * $calname 5 * The name of the calendar. 6 * $site_timezone 7 * The name of the site timezone. 8 * $events 9 * An array with the following information about each event: 10 * 11 * $event['uid'] - a unique id for the event (usually the url). 12 * $event['summary'] - the name of the event. 13 * $event['start'] - the formatted start date of the event. 14 * $event['end'] - the formatted end date of the event. 15 * $event['rrule'] - the RRULE of the event, if any. 16 * $event['timezone'] - the formatted timezone name of the event, if any. 17 * $event['url'] - the url for the event. 18 * $event['location'] - the name of the event location. 19 * $event['description'] - a description of the event. 20 * 21 * Note that there are empty spaces after RRULE, URL, LOCATION, etc 22 * that are needed to make sure we get the required line break. 23 * 24 */ 25 26 ?> 27 BEGIN:VCALENDAR 28 VERSION:2.0 29 METHOD:PUBLISH 30 X-WR-CALNAME: <?php print $calname . "\r\n"; ?> 31 PRODID:-//Drupal iCal API//EN 32 <?php foreach($events as $event): ?> 33 BEGIN:VEVENT 34 UID:<?php print($event['uid'] . "\r\n") ?> 35 SUMMARY:<?php print($event['summary'] . "\r\n") ?> 36 DTSTAMP:<?php print($current_date . "Z\r\n") ?> 37 DTSTART:<?php print($event['start'] . "Z\r\n") ?> 38 <?php if (!empty($event['end'])): ?> 39 DTEND:<?php print($event['end'] . "Z\r\n") ?> 40 <?php endif; ?> 41 <?php if (!empty($event['rrule'])) : ?> 42 <?php print($event['rrule'] . "\r\n") ?> 43 <?php endif; ?> 44 <?php if (!empty($event['url'])): ?> 45 URL;VALUE=URI:<?php print($event['url'] . "\r\n") ?> 46 <?php endif; ?> 47 <?php if (!empty($event['location'])): ?> 48 LOCATION:<?php print($event['location'] . "\r\n") ?> 49 <?php endif; ?> 50 <?php if (!empty($event['description'])) : ?> 51 DESCRIPTION:<?php print($event['description'] . "\r\n") ?> 52 <?php endif; ?> 53 END:VEVENT 54 <?php endforeach; ?> 55 END:VCALENDAR
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |