You are here

parser_ical.module in iCal feed parser 6

Parse the incoming URL with date_api_ical

TODO Figure out how to incorporate VVENUE information into the parser.

File

parser_ical.module
View source
<?php

/**
 * @file
 * Parse the incoming URL with date_api_ical 
 * 
 * TODO Figure out how to incorporate VVENUE information into the parser.  
 */

/**
 * Implementation of hook_help().
 */
function parser_ical_help($path, $arg) {
  switch ($path) {
    case 'admin/modules#description':
      return t('Provide a common iCal parser for FeedAPI-compatible modules.');
    case 'feedapi/full_name':
      return t('iCal Parser');
  }
}

/**
 * Implementation of hook_feedapi_feed().
 */
function parser_ical_feedapi_feed($op) {
  module_load_include('inc', 'parser_ical', 'parser_ical.feedapi');
  $args = func_get_args();
  switch ($op) {
    case 'type':
      return array(
        'iCal feed',
      );
    case 'compatible':
      $url = is_object($args[1]) ? $args[1] : FALSE;
      $ical_array = _parser_ical_feedapi_parse($url, FALSE);
      if ($ical_array !== FALSE) {
        return 'iCal feed';
      }
      else {
        return FALSE;
      }
    case 'parse':
      $feed = is_object($args[1]) ? $args[1] : FALSE;
      $cache = isset($args[2]) ? $args[2] : FALSE;
      return _parser_ical_feedapi_parse($feed, $cache);
  }
}

Functions

Namesort descending Description
parser_ical_feedapi_feed Implementation of hook_feedapi_feed().
parser_ical_help Implementation of hook_help().