Changeset 702
- Timestamp:
- 01/24/08 10:57:36 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/extensions/event_calendar/README
r701 r702 1 = Event Calendar (iCal) Extension for Radiant 1 = Event Calendar (iCal) Extension for Radiant = 2 2 3 3 Created by: Loren Johnson - www.hellovenado.com … … 6 6 7 7 8 INSTALLATION 8 == INSTALLATION == 9 * Req'd Radiant Version: 0.6.4+ (not tested with earlier versions, may work with all 0.6+) 9 10 10 11 1. Checkout extension to the vendor/extensions directory of your Radiant app using svn (you may have already done this): … … 12 13 svn co http://svn.fn-group.com/radiant_extensions/event_calendar 13 14 14 2. Install VPIM iCal/vCal parsing gem: gem install vpim15 2. Install the VPIM iCal/vCal parsing gem: gem install vpim 15 16 16 3. Copy extension public assets to Radiant public directory. Currently this will create the default public/icals directory which is required 17 3. Migrate extensions: rake db:migrate:extensions 18 19 4. Copy extension public assets to Radiant public directory. Currently this will create the default public/icals directory which is required 17 20 as a home for the cached ical subscription files, this is configurable via Radiant::Config["event_calendar.icals_path"]: 18 21 19 22 rake radiant:extensions:event_calendar:update 20 23 21 4. Migrate extensions: rake db:migrate:extensions 22 23 5. From Admin navigate to your new "Event Calendars" tab and click "Add a Calendar", enter your iCal subscription URL at this point and press Save. 24 5. From Admin navigate to your new "Event Calendars" tab and click "Add a Calendar", enter your iCal subscription URL and name for the calendar and press Save. 24 25 25 26 6. You can now manually refresh the calendar from the subscription once you've saved it by clicking on the Refresh link. 26 You may wish to setup a cron job to do this for you automatically: script/runner -e production "Calendar::refresh_all"27 27 28 28 29 NOTES 29 == AN EXAMPLE EVENT-CALENDAR IMPLEMENTATION == 30 30 31 * The handling of all paths below the node where the Event Calendar Page type gets applied are overridden to capture the calendar "category" and "slug". 32 So, if you create a page under Root > Calendar and apply the EventCalendar page type to it, then through admin create a calendar with the category of 33 "master" and a name of "youth" you'll be able to access your calendar at http://yoursite.com/calendar/master/youth. Also, you'll also be able to see 34 events for all calendars with a category of "master" by navigating to http://yoursite.com/calendar/master/all. 31 1. Create a new Calendar under the EventCalendar tab in admin entering at minimum a Name and iCal URL 35 32 36 * For add'l documentation please refer to the Radiant tag reference for the <r:calendar /> tag series. 37 33 2. Click on the "Refresh" link for the calendar after it's been successfuly created to download all the events from the iCal subscription 38 34 35 3. Create a new page and select EventCalendar as the Page Type 39 36 40 AN EXAMPLE EVENT-CALENDAR IMPLEMENTATION 41 ** The EventCalendar tag library has been refactored (they make more sense now) and a couple of the tags in this example are no longer valid. 42 ** I'll update the example shortly but until then please refer to the tag documentation under "Available Tags" when creating/editing a page in Radiant. 37 4. Paste the following code in the body page part then save the page 43 38 44 39 <r:calendar> … … 47 42 <td> 48 43 <ul> 49 <li><r:calendar:nav:week_link class="navLink" /></li> 50 <li><r:calendar:nav:month_link class="navLink" /></li> 51 <li><r:calendar:nav:year_link class="navLink" /></li> 52 </ul> 44 <r:nav> 45 <li><r:week_link class="navLink" /></li> 46 <li><r:month_link class="navLink" /></li> 47 <li><r:year_link class="navLink" /></li> 48 </r:nav> 49 </ul> 53 50 </td> 54 51 </tr> … … 78 75 <td> 79 76 <div id="detail<r:id />" class="detail"> 80 <r: timeperiodformat="%I:%M %p" /><br />77 <r:daterange format="%I:%M %p" /><br /> 81 78 <r:location /><br /> 82 79 <r:description /> … … 90 87 </r:calendar> 91 88 89 5. Navigate to the newly created page within the public site 90 91 92 == NOTES == 93 94 * The handling of all paths below the node an EventCalendar Page are overridden to capture the calendar "category" and "slug". 95 So, if you create a page under Home > Calendar and apply the EventCalendar page type to it, and through admin create a calendar with the category of 96 "master" and a name of "youth" you'll be able to access your calendar at http://yoursite.com/calendar/master/youth. Also, you'll also be able to see 97 events for all calendars with a category of "master" by navigating to http://yoursite.com/calendar/master/all. 98 99 * For add'l documentation please refer to the Radiant tag reference (the "Available tags" link within Page edit) for the <r:calendar /> tag series, 100 you'll only see the Calendar tag documentation available when editing a page that has already been saved as the EventCalendar Page Type. 101 102 * Please refer to the tag documentation under "Available Tags" when editing a page in Radiant (page must be already created and of EventCalendar type). 103 104 * If you wish to setup a Cron job to automatically keep you Radiant calendar in-sync with the iCal feed have Cron run the following from within the root 105 of your Radiant application: script/runner -e production "Calendar::refresh_all" 92 106 93 107 94 ROADMAP 108 == DEVELOPMENT ROADMAP == 95 109 96 110 * Single page view for each Event, possibly adding ability to associate an Event with a particular Radiant page also. trunk/extensions/event_calendar/app/models/event_calendar_tags.rb
r700 r702 199 199 Usage: 200 200 <pre><code> 201 <r:calendar:event:each: timeperiodformat="" separator="" />201 <r:calendar:event:each:daterange format="" separator="" /> 202 202 </code></pre>} 203 203 tag "calendar:event:each:daterange" do |tag|
