Calendar data is some of the most requested information for including into a new site. Any department or group that utilized the Oregon State University Calendar can import their data into Drupal. To request a calendar please contact Central Web Services.
The following tutorial will illustrate how to preform the import of data and display it in a list or miniature calendar.
<?php
/**
* An example of a list.
* function minical_list()
* @param calendar string Shortname of calendar to display (ex: 'osu'),
* Or a shortname + layer list: osu+osu-lectures
* @param start_date string Day to start the calendar range, in yyyymmdd format, or 'today'
* @param range string One of 'day','week', or 'month'
* @param tease_chars int The amount of chars we want to show in a 'teaser'
* @param max_events int The max events to show
*/
require_once('CWS/calendar-rss.php');echo minical_list('osu', 'today', 'month', 0, 5);
?>
Examples for the use of the minical_list function
- Show the Extension calendar from today to a week in the future with a maximum of 3 events.
minical_list('extension', 'today', 'week', 0, 3);- Show a weeks worth of the Psychology calendar from June 1st 2007.
minical_list('psychology', '20080601', 'week', 0, 5);
<?php
/**
* An example of a month view.
* @param calendar string Shortname of calendar to display (ex: 'osu'),
* Or a shortname + layer list: osu+osu-lectures
* @param start_date string Day to start the calendar range, in yyyymmdd format, or 'today'
* @param range string One of 'day','week', or 'month'
* @param xsl string Filename of XSL file to use for parsing the RSS output
* @return string HTML markup for minicalendar
*/
require_once('CWS/calendar-rss.php');echo minical_month('osu', 'today', 'month');
?>