calendar-style-ical.tpl.php 664 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * $title
  4. * The name of the calendar.
  5. *
  6. * If you are editing this file, remember that all output lines generated by it
  7. * must end with DOS-style \r\n line endings, and not Unix-style \n, in order to
  8. * be compliant with the iCal spec (see http://tools.ietf.org/html/rfc5545#section-3.1)
  9. */
  10. if (empty($method)) {
  11. $method = 'PUBLISH';
  12. }
  13. print "BEGIN:VCALENDAR\r\n";
  14. print "VERSION:2.0\r\n";
  15. print "METHOD:$method\r\n";
  16. if (!empty($title)) {
  17. print "X-WR-CALNAME;VALUE=TEXT:$title\r\n";
  18. }
  19. print "PRODID:-//Drupal iCal API//EN\r\n";
  20. // Note that $rows already has the right line endings and needs no more.
  21. print "$rows";
  22. print "END:VCALENDAR\r\n";