Using this module, I can easily do a one time export to an iCal file, but when an item changes in my Drupal calendar, there's no easy way to automatically make those changes available to the other calendaring clients that might be reading or importing the file. Am I missing something basic? Is this module only setup to do one-off exports?

Do I need to setup a rule to re-export the whole calendar file every time an event changes? Is there an easier way?

Comments

videographics’s picture

Status: Active » Closed (works as designed)

Sorry. I must have been brain dead today. This is painfully obvious. Never mind.

sadashiv’s picture

If you want to sync a google calendar with the site calendar then check Google calendar.
Google calendar allows to manage google calendars and events. You need to write a custom module which will update google calendar on update of a calendar in drupal.

Hth,
Sadashiv.

potassiumchloride’s picture

I have the same question but don't see the answer as "painfully obvious." @videographics - can you explain?

BusinessMediaCenter’s picture

+1 please do explain!

coredumperror’s picture

I'm not entirely certain what videogrphics did, but I believe the solution to this is issue is that you need to "subscribe" your calendar client to the webcal:// feed created by your view. This should allow your calendar client to recognize changes made to existing events. Just make sure that your client is set to refresh its subscriptions often.

walidvb’s picture

Not so painfully obvious to me either. videographics, would you mind posting your solution?

EDIT--------------
Here is my solution:

Just add a new feed display, with iCal Feeds display., and give it a feed.ics path, or better, a feeds/%/feed.ics path(that will give you argument).
then just add the link wherever you want it. Users will have to copy and paste the link to their calendar application, though. Haven't figured out how to have the link open directly in Calendar instead of downloading a file.

here is a ready made views, with field_date as date, but this can be change easily.

$view = new view();
$view->name = 'Feed';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Feed';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['style_plugin'] = 'grid';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Content: Date */
$handler->display->display_options['fields']['field_date']['id'] = 'field_date';
$handler->display->display_options['fields']['field_date']['table'] = 'field_data_field_date';
$handler->display->display_options['fields']['field_date']['field'] = 'field_date';
$handler->display->display_options['fields']['field_date']['label'] = '';
$handler->display->display_options['fields']['field_date']['element_type'] = '0';
$handler->display->display_options['fields']['field_date']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['field_date']['element_wrapper_type'] = '0';
$handler->display->display_options['fields']['field_date']['element_default_classes'] = FALSE;
$handler->display->display_options['fields']['field_date']['settings'] = array(
  'format_type' => 'long',
  'fromto' => 'both',
  'multiple_number' => '',
  'multiple_from' => '',
  'multiple_to' => '',
);
$handler->display->display_options['fields']['field_date']['field_api_classes'] = TRUE;
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = TRUE;
$handler->display->display_options['fields']['title']['alter']['text'] = '[title] [ [field_music_genre] ]';
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = FALSE;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = FALSE;
$handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
/* Field: Global: Custom text */
$handler->display->display_options['fields']['nothing']['id'] = 'nothing';
$handler->display->display_options['fields']['nothing']['table'] = 'views';
$handler->display->display_options['fields']['nothing']['field'] = 'nothing';
$handler->display->display_options['fields']['nothing']['label'] = '';
$handler->display->display_options['fields']['nothing']['alter']['text'] = '
Horaires et infos sur <a href="http://cordesavides.ch">cordesavides.ch</a>';
$handler->display->display_options['fields']['nothing']['element_label_colon'] = FALSE;
/* Sort criterion: Content: Post date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'node';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Contextual filter: Content: Nid */
$handler->display->display_options['arguments']['nid']['id'] = 'nid';
$handler->display->display_options['arguments']['nid']['table'] = 'node';
$handler->display->display_options['arguments']['nid']['field'] = 'nid';
$handler->display->display_options['arguments']['nid']['default_argument_type'] = 'fixed';
$handler->display->display_options['arguments']['nid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['nid']['summary_options']['items_per_page'] = '25';
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = 1;
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'event' => 'event',
);

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->display->display_options['path'] = 'calendar';

/* Display: Feed */
$handler = $view->new_display('feed', 'Feed', 'feed_1');
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['style_plugin'] = 'date_ical';
$handler->display->display_options['style_options']['cal_name'] = 'lezoo';
$handler->display->display_options['row_plugin'] = 'date_ical_fields';
$handler->display->display_options['row_options']['date_field'] = 'field_date';
$handler->display->display_options['row_options']['title_field'] = 'title';
$handler->display->display_options['row_options']['description_field'] = 'field_vjs';
$handler->display->display_options['row_options']['additional_settings'] = array(
  'skip_blank_dates' => 0,
);
$handler->display->display_options['path'] = 'feed.ics';
$translatables['Feed'] = array(
  t('Master'),
  t('more'),
  t('Apply'),
  t('Reset'),
  t('Sort by'),
  t('Asc'),
  t('Desc'),
  t('Items per page'),
  t('- All -'),
  t('Offset'),
  t('« first'),
  t('‹ previous'),
  t('next ›'),
  t('last »'),
  t('All'),
  t('Page'),
  t('Feed'),
);
coredumperror’s picture

If you want to open the link directly in a calendar client, you'll want the webcal:// protocol. Date iCal offers feed links using webcal:// by default, when you attach the feed display to another view (the little orange icon that appears on the attached view's page).

If you haven't got another view to attach to, simply replace http:// in the feed path with webcal://, and the file should both open directly into your calendar client, and subscribe to updates.

mooru’s picture

Component: Code » iCal Import
Issue summary: View changes

Is there a way to rewrite the titles of ical from a calendar view e.g. the title field. I have birthday fields in nodes using date repeat api and i would like the exported ics file to have something titles like "John Seymour Birthday" where John Seymour is the title of the node. How do i get the ical from calendar view to add "Birthday"

Also when i try to sync my drupal calendar with apple calendar through icloud on my mac i don't see the calendar output. Any ideas why?

coredumperror’s picture

I'm not really sure why you decided to ask for these support requests on a completely unrelated issue (you're supposed to open a new issue for this kind of thing), but I'll do my best to help.

Yes, it's possible to add "Birthday" to the title field, as long as you're using the iCal Fields plugin for your view (iCal Entity won't work). Refer to the Date iCal README file for details on how to set up an iCal Fields-based view.

To set the Title field to include "Birthday", click the "Content: Title" field, open the REWRITE RESULTS fieldset, and check the "Rewrite the output of this field" checkbox. In the textarea that appears, type "[title] Birthday" (without the quotes) then click Apply.

As for the apple calendar problem you've having, I'm afraid I can't really help, since I don't use Apple Calendar.