In and event the ATTENDEE may look like this
ATTENDEE;CN=The
Name;RSVP=FALSE;PARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT;X-UID=vcard.ll-196:m
ailto:name@somewhere
currently everything is extracted as name and looks very
scary if the user clicks on the event to see it's details.
I have fixed it like this:
case 'ATTENDEE':
$attendee[] = array ('name' =>
ereg_replace ("ATTENDEE;CN=([^;]*).*", "\\1", $field),
'email' =>
ereg_replace (".*mailto:(.*).*", "\\1", $field),
'RSVP' =>
ereg_replace (".*RSVP=([^;]*).*", "\\1", $field),
'PARSTAT' =>
ereg_replace (".*PARTSTAT=([^;]*).*", "\\1", $field),
'ROLE' =>
ereg_replace (".*ROLE=([^;]*).*", "\\1", $field));
break;
I have added parsing for additional fields which may be
used in the future.
Jim Hu
Parsing iCals
v2.0
Public
|
Date: 2008-12-26 09:11 Please test this problem with the latest version of PHP iCalendar in CVS |
|
Date: 2008-12-26 09:11 patch applied |
|
Date: 2006-10-11 19:36 Logged In: YES |
|
Date: 2005-05-17 08:06 Logged In: YES |
|
Date: 2005-05-16 19:43 Logged In: YES |
| Filename | Description | Download |
|---|---|---|
| attendee.php | modified part of ical_parser.php | Download |
| sample.ics | Sample of VEVENT with ATTENDEE generated by korganizer 3.3 | Download |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2008-12-26 09:11 | jimhu |
| resolution_id | None | 2008-12-26 09:11 | jimhu |
| close_date | - | 2008-12-26 09:11 | jimhu |
| File Added | 134776: sample.ics | 2005-05-17 08:11 | geraldweber |
| File Added | 131810: attendee.php | 2005-04-26 14:27 | geraldweber |
Copyright © 2010 Geeknet, Inc. All rights reserved. Terms of Use