Commit 5035953b authored by Robert Rollins's avatar Robert Rollins
Browse files

Added a version number to help me determine which version of Date iCal is...

Added a version number to help me determine which version of Date iCal is being used by something who's having problems.

Added the hook_date_ical_post_render() alter hook.
parent 5b4ad260
......@@ -116,6 +116,18 @@ function hook_date_ical_feed_ical_vcalendar_render_alter(&$vcalendar, $view) {
}
/**
* Alter the rendered text of an iCal feed before it gets sent to Views.
*
* @param $rendered_calendar
* The rendered string of iCal text created from an iCalcreator vcalendar object.
* @param $view
* The view object that is being executed to render the iCal feed.
*/
function hook_date_ical_post_render_alter(&$rendered_calendar, $view) {
}
/**
* Alter the iCalcreator vcalendar object that was parsed from an imported
* iCal feed.
......
......@@ -7,6 +7,12 @@
* TODO Figure out how to incorporate VVENUE information into the parser.
*/
/**
* The version number of the current release. This is inserted into the PRODID
* value of the iCal feeds created by Date iCal.
*/
define('DATE_ICAL_VERSION', '2.9');
/**
* Exception for when the date field for a row in the ical_fields row plugin is blank.
*/
......
......@@ -110,7 +110,7 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
$library = libraries_load('iCalcreator');
if (!empty($library['loaded'])) {
// Create a vcalendar object using the iCalcreator library.
$config = array('unique_id' => 'Drupal: Date iCal');
$config = array('unique_id' => 'Drupal: Date iCal v' . DATE_ICAL_VERSION);
$vcalendar = new vcalendar($config);
$vcalendar->setMethod('PUBLISH');
......@@ -318,6 +318,9 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
}
}
// Allow other modules to alter the rendered calendar, just before it gets sent out.
drupal_alter('date_ical_post_render', $output, $this->view);
return $output;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment