You are here

calendar_ical.module in Calendar 7

Adds ical functionality to Calendar.

File

calendar_ical/calendar_ical.module
View source
<?php

/**
 * Implementation of hook_views_api().
 *
 * This one is used as the base to reduce errors when updating.
 */
function calendar_ical_views_api() {
  return array(
    'api' => 2,
    'path' => drupal_get_path('module', 'calendar_ical'),
  );
}

/**
 * @file
 * Adds ical functionality to Calendar.
 */
function calendar_ical_theme() {
  return array(
    'calendar_ical_icon' => array(
      'variables' => array(
        'url',
      ),
    ),
  );
}
function theme_calendar_ical_icon($vars) {
  $url = $vars['url'];
  $variables = array(
    'path' => drupal_get_path('module', 'date_api') . '/images/ical16x16.gif',
    'title' => t('Add to calendar'),
    t('Add to calendar'),
  );
  if ($image = theme('image', $variables)) {
    return '<div style="text-align:right"><a href="' . check_url($url) . '" class="ical-icon" title="ical">' . $image . '</a></div>';
  }
}

Functions

Namesort descending Description
calendar_ical_theme @file Adds ical functionality to Calendar.
calendar_ical_views_api Implementation of hook_views_api().
theme_calendar_ical_icon