About iCalendar Markup

A module that acts as a wrapper for creating iCalendar feeds using the iCalcreator library.

Category Markup Generation
Markup modules that are called upon to generate or parse markup (like HTML). Markup modules are most often used on the front-end of a site (rather than admin).
Release StateBeta
Close to stable, but users are advised to be cautious and test thoroughly.*
Authorffub
Module Version0.0.1
Class NameMarkupiCalendar
Compatibility2.1, 2.2
Date AddedJuly 26, 2012
Last UpdatedJuly 25, 2012
Recommended ByNew recommendations may take up to 1 day to appear.

Details

Given a PageArray of pages, this module will render an iCalendar feed from them. This is intended to be used directly from a template file. See usage below.

The module uses the excellent iCalcreator library from http://www.kigkonsult.se/iCalcreator/ for creating the ICS feed itself and as such mostly just acts as a simple wrapper.

Instructions

Usage


Code:
$ics = $modules->get("MarkupiCalendar");$ics->title = "Upcoming Events"; $ics->description = "Some upcoming events"; $ics->itemStartDateField = 'date'; $today = time(); $items = $pages->find("template=event, limit=30, sort=date, date>$today"); $ics->render($items);

Runtime options
Code:
'title' => 'Untitled iCal Feed','url' => '', 'description' => '', 'itemSummaryField' => 'title', 'itemDescriptionField' => 'summary', 'itemLocationField' => false, 'itemStartDateField' => 'created', 'itemEndDateField' => false, 'feedPages' => array(), 'timezone' => false

Copyright (C) 2011 by Stephen Tomlinson
This module is licensed under Apache License v2.0, see LICENSE.TXT within the module folder.

The iCalcreator library is copyright (c) 2007-2011 Kjell-Inge Gustafsson and licensed under the LPGL.

http://twitter.com/ffub

README

Given a PageArray of pages, this module will render an iCalendar feed from them.This is intended to be used directly from a template file. See usage below.

The module uses the excellent iCalcreator library from http://www.kigkonsult.se/iCalcreator/ for creating the ICS feed itself and as such mostly just acts as a simple wrapper.

Usage

$ics = $modules->get("MarkupiCalendar"); 
$ics->title = "Upcoming Events";
$ics->description = "Some upcoming events";
$ics->itemStartDateField = 'date';
$today = time();
$items = $pages->find("template=event, limit=30, sort=date, date>$today");
$ics->render($items);

Runtime options

'title' => 'Untitled iCal Feed',
'url' => '',
'description' => '',
'itemSummaryField' => 'title',
'itemDescriptionField' => 'summary',
'itemLocationField' => false,
'itemStartDateField' => 'created',
'itemEndDateField' => false,
'feedPages' => array(),
'timezone' => false

Copyright (C) 2011 by Stephen Tomlinson
This module is licensed under Apache License v2.0, see LICENSE.TXT within the module folder.
The iCalcreator library is copyright (c) 2007-2011 Kjell-Inge Gustafsson and licensed under the LPGL.

http://twitter.com/ffub
http://www.processwire.com

Comments

No comments yet. Be the first to post!

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.