theme.inc in Date iCal 7
Theme files for Date iCal.
File
theme/theme.incView source
<?php
/**
* @file
* Theme files for Date iCal.
*/
/**
* Preprocess an iCal feed
*/
function template_preprocess_date_ical_vcalendar(&$variables) {
$view = $variables['view'];
$ical_description = $view->style_plugin->options['description'];
$view_title = $view
->get_title();
$site_name = variable_get('site_name', 'Drupal');
// If an iCal Description has been set in the Feed Style options, that is used as the
// title in the iCal feed. If not, the View Title is used. If that is blank, then the
// Site Name is used.
if (!empty($ical_description)) {
$title = $ical_description;
}
elseif (!empty($view_title)) {
$title = $view_title;
}
else {
$title = $site_name;
}
$variables['title'] = check_plain($title);
// During live preview we don't want to output the header since the contents
// of the feed are being displayed inside a normal HTML page.
if (empty($variables['view']->live_preview)) {
// Keep devel module from appending queries to ical export.
$GLOBALS['devel_shutdown'] = FALSE;
drupal_add_http_header('Content-Type', 'application/calendar; charset=utf-8');
}
}
/**
* Default theme function for all iCal rows.
*/
function template_preprocess_date_ical_vevent(&$variables) {
$view =& $variables['view'];
$options =& $variables['options'];
$item =& $variables['row'];
}
Functions
Name | Description |
---|---|
template_preprocess_date_ical_vcalendar | Preprocess an iCal feed |
template_preprocess_date_ical_vevent | Default theme function for all iCal rows. |