Projet

Général

Profil

Révision c7b88c87

Ajouté par Assos Assos il y a presque 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/date_ical/README.txt
16 16
- The Feeds module is optional. It's needed only if you you wish to import iCal
17 17
  feeds from other sites.
18 18

  
19
To install the iCalcreator library, download the project's official zip file:
20
https://github.com/iCalcreator/iCalcreator/archive/master.zip
19
To install the iCalcreator library, download the project's v2.20.2 zip file:
20
https://github.com/iCalcreator/iCalcreator/archive/e3dbec2cb3bb91a8bde989e467567ae8831a4026.zip
21 21
Extract it, and copy iCalcreator.class.php to a folder in your Drupal site
22 22
named sites/all/libraries/iCalcreator (you'll need to create that folder).
23 23

  
......
91 91
    "Format: iCal Feed", and check "Disable webcal://". Then save your View.
92 92
    This will make the iCal icon download a .ics file with the events, instead
93 93
    of loading the events directly into the user's calendar app.
94
17. If events that you expect your feed to include are not appearing when it
95
    gets consumed by a calendar app, check the Drupal permissions for your
96
    event content type. If anonymous users can't view the event nodes, they
97
    won't appear in your feed when it gets loaded by a calendar app.
94 98

  
95 99
HOW TO EXPORT AN ICAL FEED USING THE iCal Fields PLUGIN
96 100
1-6.These steps are the same as above.
......
238 242
The libraries/windowsZones.json file, which Date iCal uses to map Windows-style
239 243
timezone names to real timezone IDs, is from Version24 of the Unicode CLDR:
240 244
http://cldr.unicode.org/.
245

  
246
The author of iCalcreator made backwards incompatible changes to the library
247
in the v2.22 release. Thus Date iCal does not currently support any version of
248
iCalcreator after v2.20.2.
drupal7/sites/all/modules/date_ical/date_ical.api.php
234 234
 *     description: The description of this field shown in the Mapping page.
235 235
 *     date_ical_parse_handler: The function in the ParserVcalendar class
236 236
 *       which should be used to parse this iCal property into a Drupal field.
237
 *
238
 * Available date_ical_parse_handlers are:
239
 *   parseTextProperty
240
 *   parseDateTimeProperty
241
 *   parseRepeatProperty
242
 *   parseMultivalueProperty
243
 *   parsePropertyParameter
237 244
 */
238 245
function hook_date_ical_mapping_sources_alter(&$sources) {
239 246
  // Example of what might be done with this alter hook:
drupal7/sites/all/modules/date_ical/date_ical.info
21 21
; Includes for iCal feed import using Feeds
22 22
files[] = includes/DateiCalFeedsParser.inc
23 23

  
24
; Information added by Drupal.org packaging script on 2014-10-08
25
version = "7.x-3.3"
24
; Information added by Drupal.org packaging script on 2015-05-05
25
version = "7.x-3.4"
26 26
core = "7.x"
27 27
project = "date_ical"
28
datestamp = "1412727230"
28
datestamp = "1430852013"
29 29

  
drupal7/sites/all/modules/date_ical/date_ical.make
1 1
core = 7.x
2 2
api = 2
3 3

  
4
libraries[iCalcreator][download][type] = "git"
5
libraries[iCalcreator][download][url] = "git://github.com/iCalcreator/iCalcreator.git"
4
libraries[iCalcreator][download][type] = "get"
5
libraries[iCalcreator][download][url] = "https://github.com/iCalcreator/iCalcreator/archive/e3dbec2cb3bb91a8bde989e467567ae8831a4026.zip"
6
libraries[iCalcreator][directory_name] = "iCalcreator"
7
libraries[iCalcreator][destination] = "libraries"
drupal7/sites/all/modules/date_ical/date_ical.module
10 10
 * value of the iCal feeds created by Date iCal. It's primarily used for
11 11
 * debugging.
12 12
 */
13
define('DATE_ICAL_VERSION', '3.3');
13
define('DATE_ICAL_VERSION', '3.4-dev');
14 14

  
15 15
/**
16 16
 * Exception class for generic exceptions thrown by this module.
drupal7/sites/all/modules/date_ical/includes/DateiCalFeedsParser.inc
153 153
    $sources = array();
154 154
    $sources['SUMMARY'] = array(
155 155
      'name' => t('Summary/Title'),
156
      'description' => t('The SUMMARY property. A short summary (usually the title) of the event.'),
156
      'description' => t('The SUMMARY property. A short summary (usually the title) of the event.
157
        A title is required for every node, so you need to include this source and have it mapped to the node title, except under unusual circumstances.'
158
      ),
159
      'date_ical_parse_handler' => 'parseTextProperty',
160
    );
161
    $sources['COMMENT'] = array(
162
      'name' => t('Comment'),
163
      'description' => t('The COMMENT property. A text comment is allowed on most components.'),
157 164
      'date_ical_parse_handler' => 'parseTextProperty',
158 165
    );
159 166
    $sources['DESCRIPTION'] = array(
drupal7/sites/all/modules/date_ical/includes/date_ical_plugin_row_ical_entity.inc
67 67
      // The surrounding <div> ensures that the settings dialog expands.
68 68
      '#prefix' => '<div style="font-size: 90%">',
69 69
      '#suffix' => '</div>',
70
      '#markup' => t("Each item's Title and iCal view mode will be included as the SUMMARY and DESCRIPTION elements (respectively) in the VEVENTs output by this View.
70
      '#markup' => t("Each item's Title will be the SUMMARY and the rendered iCal view mode will be the DESCRIPTION in the VEVENTs output by this View.
71 71
        <br>To change the iCal view mode, configure it on the 'Manage Display' page for each Content Type.
72
        Please note that HTML will be stripped from the output (link URLs will become footnotes), to comply with iCal standards."),
72
        Please note that all HTML will be stripped from the output, to comply with iCal standards."),
73 73
    );
74 74
    
75 75
    // Build the select dropdown for the text/node_reference field that the user
drupal7/sites/all/modules/date_ical/includes/date_ical_plugin_style_ical_feed.inc
291 291
                'year' =>  $addition_array['year'],
292 292
                'month' => $addition_array['month'],
293 293
                'day' =>   $addition_array['day'],
294
                // Use the time information from the start date, since Date
295
                // doesn't store time info for RDATEs.
296
                'hour' =>   $start['hour'],
297
                'min' =>    $start['minute'],
298
                'second' => $start['second'],
294
                // If the user's copy of Date has support for time in RDATEs,
295
                // use that. Otherwise use the time from the start date.
296
                'hour' =>   isset($addition_array['hour']) ? $addition_array['hour'] : $start['hour'],
297
                'min' =>    isset($addition_array['minute']) ? $addition_array['minute'] : $start['minute'],
298
                'second' => isset($addition_array['second']) ? $addition_array['second'] : $start['second'],
299 299
                'tz' =>     $start['tz']->getName(),
300 300
              );
301 301
              
......
308 308
                  'year' =>  $addition_array['year'],
309 309
                  'month' => $addition_array['month'],
310 310
                  'day' =>   $addition_array['day'],
311
                  // Use the time information from the end date.
312
                  'hour' =>   $end['hour'],
313
                  'min' =>    $end['minute'],
314
                  'second' => $end['second'],
311
                  // If the user's copy of Date has support for time in RDATEs,
312
                  // use that. Otherwise use the time from the end date.
313
                  'hour' =>   isset($addition_array['hour']) ? $addition_array['hour'] : $end['hour'],
314
                  'min' =>    isset($addition_array['minute']) ? $addition_array['minute'] : $end['minute'],
315
                  'second' => isset($addition_array['second']) ? $addition_array['second'] : $end['second'],
315 316
                  'tz' =>     $end['tz']->getName(),
316 317
                );
317 318
                $rdate = $rdate_with_end;
......
405 406
      }
406 407
    }
407 408
    
408
    // These steps shouldn't be run when during Preview on the View page.
409
    // These steps shouldn't be run during Preview on the View page.
409 410
    if (empty($this->view->live_preview)) {
410 411
      // Prevent devel module from appending queries to ical export.
411 412
      $GLOBALS['devel_shutdown'] = FALSE;
drupal7/sites/all/modules/date_ical/libraries/ParserVcalendar.inc
91 91
      $this->timezones[] = $component;
92 92
    }
93 93
    
94
    // This content array is used by date_ical_import_component_alter() and
94
    // This context array is used by date_ical_import_component_alter() and
95 95
    // date_ical_import_parsed_data_alter().
96 96
    $context2 = array(
97 97
      'calendar' => $this->calendar,
......
225 225
    }
226 226
    
227 227
    if ($text === FALSE) {
228
      if ($property_key == 'SUMMARY') {
228
      if ($property_key != 'SUMMARY') {
229
        return NULL;
230
      }
231
      else {
229 232
        $uid = $vcalendar_component->getProperty('UID');
230
        throw new DateIcalParseException(t('The component with UID %uid is invalid because it has no SUMMARY (nodes require a title).', array('%uid' => $uid)));
233
        if ($vcalendar_component->objName == 'vfreebusy') {
234
          // FREEBUSY elements can't have SUMMARY, but they can have COMMENT.
235
          // So if the feed has been configured to ask for SUMMARY, use COMMENT
236
          // instead. If COMMENT is also missing, we can't import.
237
          $text = $vcalendar_component->getProperty('COMMENT');
238
          if ($text === FALSE) {
239
            throw new DateIcalParseException(t('The VFREEBUSY component with UID %uid is invalid because it has no COMMENT.
240
              Nodes require a title, and since VFREEBUSY components can\'t have SUMMARY, Date iCal pulls that title from the COMMENT.',
241
              array('%uid' => $uid))
242
            );
243
          }
244
        }
245
        else {
246
          // Non-VFREEBUSY components must have a SUMMARY.
247
          throw new DateIcalParseException(t('The component with UID %uid is invalid because it has no SUMMARY (nodes require a title).',
248
            array('%uid' => $uid))
249
          );
250
        }
231 251
      }
232
      // If the component doesn't have this property, return NULL.
233
      return NULL;
234 252
    }
235 253
    // Convert literal \n and \N into newline characters.
236 254
    $text = str_replace(array('\n', '\N'), "\n", $text);

Formats disponibles : Unified diff