Commit ffc3a855 authored by Robert Rollins's avatar Robert Rollins
Browse files

Issue #2624534: Fixed version detection for iCalcreator 2.22. Also fixed typos in README.

parent 7ac73a3d
...@@ -16,7 +16,7 @@ Date iCal has several required dependencies, and an optional one: ...@@ -16,7 +16,7 @@ Date iCal has several required dependencies, and an optional one:
- The Feeds module is optional. It's needed only if you you wish to import iCal - The Feeds module is optional. It's needed only if you you wish to import iCal
feeds from other sites. feeds from other sites.
To install the iCalcreator library, download the latest release from ths url: To install the iCalcreator library, download the latest release from this url:
https://github.com/iCalcreator/iCalcreator/archive/master.zip https://github.com/iCalcreator/iCalcreator/archive/master.zip
Extract it, and copy the contents to a folder in your Drupal site named Extract it, and copy the contents to a folder in your Drupal site named
sites/all/libraries/iCalcreator (you'll need to create that folder). sites/all/libraries/iCalcreator (you'll need to create that folder).
...@@ -100,7 +100,7 @@ HOW TO EXPORT AN ICAL FEED USING THE iCal Fields PLUGIN ...@@ -100,7 +100,7 @@ HOW TO EXPORT AN ICAL FEED USING THE iCal Fields PLUGIN
1-6.These steps are the same as above. 1-6.These steps are the same as above.
7. Add views fields for each piece of information that you want to populate 7. Add views fields for each piece of information that you want to populate
your iCal feed with. A Date field is required, and fields that will act as your iCal feed with. A Date field is required, and fields that will act as
the Title and Description of the events are reccomended. You can also the Title and Description of the events are recommended. You can also
include a Location field. include a Location field.
8. Back in the FORMAT section, change the "Show" setting to 'iCal Fields'. 8. Back in the FORMAT section, change the "Show" setting to 'iCal Fields'.
9. In the settings for iCal Fields, choose which views fields you want to use 9. In the settings for iCal Fields, choose which views fields you want to use
...@@ -126,14 +126,14 @@ IMPORTING AN ICAL FEED FROM ANOTHER SITE USING Feeds ...@@ -126,14 +126,14 @@ IMPORTING AN ICAL FEED FROM ANOTHER SITE USING Feeds
- Now, under Processor, click the "Settings" link. Most of the time, you'll - Now, under Processor, click the "Settings" link. Most of the time, you'll
want to use the "Update existing nodes (slower than replacing them)" setting. want to use the "Update existing nodes (slower than replacing them)" setting.
Then select the Content type of the nodes you'd like to create from iCal Then select the Content type of the nodes you'd like to create from iCal
events. You can leave the other settings as their defeaults, or change them events. You can leave the other settings as their defaults, or change them
as you need. Click Save. as you need. Click Save.
- Now click the "Mapping" link at the bottom of the left sidebar. This page is - Now click the "Mapping" link at the bottom of the left sidebar. This page is
where you'll define how iCal event properties get mapped into your nodes' where you'll define how iCal event properties get mapped into your nodes'
fields. Expand the "Legend" for a detailed description of each source and fields. Expand the "Legend" for a detailed description of each source and
target field. Sources are the attributes available in iCal event objects, target field. Sources are the attributes available in iCal event objects,
and Targets are the fields in your nodes. and Targets are the fields in your nodes.
- Most of this setup is going to be dependant upon how your content type's - Most of this setup is going to be dependent upon how your content type's
fields are configured, but there are some universal requirements: fields are configured, but there are some universal requirements:
1) You MUST map the "UID" source to the "GUID" target. Then, after clicking 1) You MUST map the "UID" source to the "GUID" target. Then, after clicking
"Add", click the gear-shaped button that appears in the new table row, "Add", click the gear-shaped button that appears in the new table row,
...@@ -193,7 +193,7 @@ in their local timezone, so they don't miss the broadcast. ...@@ -193,7 +193,7 @@ in their local timezone, so they don't miss the broadcast.
If your Date field is already set to "Date's time zone", you won't be able to If your Date field is already set to "Date's time zone", you won't be able to
change it, because that setting uses a different table schema than the others. change it, because that setting uses a different table schema than the others.
Since "Date's time zone" is very buggy, I'd strongly recomend deleting the Since "Date's time zone" is very buggy, I'd strongly recommend deleting the
field and recreating it with a different setting. This will delete all the field and recreating it with a different setting. This will delete all the
dates in existing event nodes which use this field. dates in existing event nodes which use this field.
......
...@@ -179,7 +179,7 @@ function date_ical_libraries_info() { ...@@ -179,7 +179,7 @@ function date_ical_libraries_info() {
'php' => array('iCalcreator.class.php'), 'php' => array('iCalcreator.class.php'),
), ),
), ),
'2.22+' => array( '2.22' => array(
'version arguments' => array( 'version arguments' => array(
'file' => 'iCalcreator.php', 'file' => 'iCalcreator.php',
'pattern' => "/define.*?ICALCREATOR_VERSION.*?([\d\.]+)/", 'pattern' => "/define.*?ICALCREATOR_VERSION.*?([\d\.]+)/",
...@@ -523,7 +523,7 @@ function _date_ical_detect_icalcreator_version($library) { ...@@ -523,7 +523,7 @@ function _date_ical_detect_icalcreator_version($library) {
return '2.20'; return '2.20';
} }
else if (file_exists(DRUPAL_ROOT . "/{$library['library path']}/iCalcreator.php")) { else if (file_exists(DRUPAL_ROOT . "/{$library['library path']}/iCalcreator.php")) {
return '2.22+'; return '2.22';
} }
else { else {
return FALSE; return FALSE;
......
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