Forum OpenACS Development: A vCalendar Example

Collapse
5: A vCalendar Example (response to 1)
Posted by Sam Snow on
http://www.cvent.com/ (which provides a service similar to the events module) lets you add an event to outlook using vCalendar. Here is how they are doing it...

First, they have some html generated on as part of the web page, in which is embedded all the needed info:

 
<FORM method="post" name="vCalendar" action="http://www.cvent.com/EventManagement/Summary/eventInfo.ics">
<input type="hidden" name="planner" value="boston@yahoo.com">
<input type="hidden" name="title" value="Weekly Email - December 12, 2000">
<input type="hidden" name="start" value="20011215T010000Z">
<input type="hidden" name="end" value="20011215T030000Z">
<input type="hidden" name="loc" value="Caprice Bar &amp; Club">
<input type="hidden" name="desc" value="DIRECTIONS TO DECEMBER HAPPY HOUR DIRECTIONS: By Car: From the South - Take the Expressway (Rt. 93) North towards Boston. Take Exit 20 (Chinatown/Kneeland Street), turning left at the ramp light onto Kneeland Street. Go five blocks. Make a left onto Tremont Street. Caprice is on your right hand side next to the Tremont House Hotel. From the West - Take the Massachusetts Turnpike East towards Boston. Take the Downtown Exit (bearing right at the end of the highway). Take a left at the light at the end of the off-ramp onto Kneeland Street. Go five blocks. Make a left onto Tremont Street. Caprice is on your right hand side next to the Tremont House Hotel. From the North - Take the Expressway South (Rt. 93) toward Boston. Take Exit 21 (Chinatown/Kneeland Street). At the light at the end of the off-ramp, bear slightly to the left for one block. Turn right onto Kneeland Street. Go five blocks. Turn left onto Tremont Street. Caprice is on your right hand side next to the Tremont House Hotel. From Storrow Drive - Exit at Back Bay/Arlington Street. Stay on Arlington Street to the end of the Boston Public Garden. Make a left onto Boylston Street. Go one and one-half blocks. Take a right onto Tremon Street and continue for 2 blocks. Caprice is on your right hand side next to the Tremont House Hotel. By Public Transportation: The most convenient MBTA stops to Caprice are the Orange Line/New England Medial Center stop and the Green Line/Boylston Street stop. Both are located one block away from Caprice. The Red Line/Park Street stop is two blocks north of Caprice on Tremont Street. Parking: There are several parking lots located near Caprice: The Tremont Street Garage adjacent to The Wang Theatre; the parking lot at the corner of Tremont and Stuart Streets; the 57 Hotel on Stuart Street; CityPlace Garage in Park Square; the Kinney Motor Mart on Stuart Street and the Fitz-Inn Lot on Kneeland Street. There are also several metered spots along the surrounding area streets, but pay attention to the signs and good luck! ">

<input type="hidden" name="createdate" value="20010822T014533Z">

Friday, December 14, 2001 8:00 PM - 10:00 PM&nbsp;<a class=detailsLinks href="javascript:document.vCalendar.submit();">Add to my calendar</a>

</FORM>
Then, when you click on the link, the following text is generated and sent to the browser as a download able file (eventInfo.ics) Then, depending on your browser, outlook opens the file and you can add it to your calendar.
 
 
BEGIN:VCALENDAR
PRODID🤔/Microsoft Corporation//Outlook 9.0 MIMEDIR//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VEVENT
ORGANIZER:MAILTO:boston@yahoo.com
DTSTART:20011215T010000Z
DTEND:20011215T030000Z
LOCATION:Caprice Bar & Club
TRANSP:OPAQUE
SEQUENCE:0
UID:040000008200E00074C5B7101A82E00800000000D0CEF827CB1CC0010000000000000000100
 00000B7B8052D1CDECF4E887AA1942D58507E
DTSTAMP:20010822T014533Z
DESCRIPTION:DIRECTIONS TO DECEMBER HAPPY HOUR DIRECTIONS: By Car: From the South - Take the Expressway (Rt. 93) North towards Boston. Take Exit 20 (Chinatown/Kneeland Street), turning left at the ramp light onto Kneeland Street. Go five blocks. Make a left onto Tremont Street. Caprice is on your right hand side next to the Tremont House Hotel. From the West - Take the Massachusetts Turnpike East towards Boston. Take the Downtown Exit (bearing right at the end of the highway). Take a left at the light at the end of the off-ramp onto Kneeland Street. Go five blocks. Make a left onto Tremont Street. Caprice is on your right hand side next to the Tremont House Hotel. From the North - Take the Expressway South (Rt. 93) toward Boston. Take Exit 21 (Chinatown/Kneeland Street). At the light at the end of the off-ramp, bear slightly to the left for one block. Turn right onto Kneeland Street. Go five blocks. Turn left onto Tremont Street. Caprice is on your right hand side next to the Tremont House Hotel. From Storrow Drive - Exit at Back Bay/Arlington Street. Stay on Arlington Street to the end of the Boston Public Garden. Make a left onto Boylston Street. Go one and one-half blocks. Take a right onto Tremon Street and continue for 2 blocks. Caprice is on your right hand side next to the Tremont House Hotel. By Public Transportation: The most convenient MBTA stops to Caprice are the Orange Line/New England Medial Center stop and the Green Line/Boylston Street stop. Both are located one block away from Caprice. The Red Line/Park Street stop is two blocks north of Caprice on Tremont Street. Parking: There are several parking lots located near Caprice: The Tremont Street Garage adjacent to The Wang Theatre; the parking lot at the corner of Tremont and Stuart Streets; the 57 Hotel on Stuart Street; CityPlace Garage in Park Square; the Kinney Motor Mart on Stuart Street and the Fitz-Inn Lot on Kneeland Street. There are also several metered spots along the surrounding area streets, but pay attention to the signs and good luck!
SUMMARY:Weekly Email - December 12, 2000
PRIORITY:5
CLASS:PUBLIC
BEGIN:VALARM
TRIGGER:PT24H
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR
 
Seems pretty straight forward...