You are here

function date_ical_plugin_style_ical_feed::options_form in Date iCal 7.2

Same name and namespace in other branches
  1. 7.3 includes/date_ical_plugin_style_ical_feed.inc \date_ical_plugin_style_ical_feed::options_form()
  2. 7 date_ical_plugin_style_ical_feed.inc \date_ical_plugin_style_ical_feed::options_form()

Provide a form to edit options for this plugin.

Overrides views_plugin_style::options_form

File

includes/date_ical_plugin_style_ical_feed.inc, line 60
Views style plugin for the Date iCal module.

Class

date_ical_plugin_style_ical_feed
Default style plugin to render an iCal feed.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);

  // Allow users to override the default Calendar name (X-WR-CALNAME).
  $form['cal_name'] = array(
    '#type' => 'textfield',
    '#title' => t('iCal Calendar Name'),
    '#default_value' => $this
      ->_get_option('cal_name'),
    '#description' => t('This will appear as the title of the iCal feed. If left blank, the View Title will be used.
        If that is also blank, the site name will be inserted as the iCal feed title.'),
  );
  $form['no_calname'] = array(
    '#type' => 'checkbox',
    '#title' => t('Exclude Calendar Name'),
    '#default_value' => $this
      ->_get_option('no_calname'),
    '#description' => t("Excluding the X-WR-CALNAME value from the iCal Feed causes\n        some calendar clients to add the events in the feed to an existing calendar, rather\n        than creating a whole new calendar for them."),
  );
  $form['disable_webcal'] = array(
    '#type' => 'checkbox',
    '#title' => t('Disable webcal://'),
    '#default_value' => $this
      ->_get_option('disable_webcal'),
    '#description' => t("By default, the feed URL will use the webcal:// scheme, which allows calendar\n        clients to easily subscribe to the feed. If you want your users to instead download this iCal\n        feed as a file, activate this option."),
  );
  $form['exclude_dtstamp'] = array(
    '#type' => 'checkbox',
    '#title' => t('Exclude DTSTAMP'),
    '#default_value' => $this
      ->_get_option('exclude_dtstamp'),
    '#description' => t("By default, the feed will set each event's DTSTAMP property to the time at which the feed got downloaded.\n        Some feed readers will (incorrectly) look at the DTSTAMP value when they compare different downloads of the same feed, and\n        conclcude that the event has been updated (even though it hasn't actually changed). Enable this option to exclude the DTSTAMP\n        field from your feeds, so that these buggy feed readers won't mark every event as updated every time they check."),
  );
}