You are here

public function date_ical_plugin_style_ical_feed::options_form in Date iCal 7.3

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

Build the form for setting the style plugin's options.

Overrides views_plugin_style::options_form

File

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

Class

date_ical_plugin_style_ical_feed
Defines a Views style plugin that renders iCal feeds.

Code

public 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."),
  );
  $form['unescape_punctuation'] = array(
    '#type' => 'checkbox',
    '#title' => t('Unescape Commas and Semicolons'),
    '#default_value' => $this
      ->_get_option('unescape_punctuation'),
    '#description' => t('In order to comply with the iCal spec, Date iCal will "escape" commas and semicolons (prepend them with backslashes).
        However, many calendar clients are bugged to not unescape these characters, leaving the backslashes littered throughout your events.
        Enable this option to have Date iCal unescape these characters before it exports the iCal feed.'),
  );
}