[kronolith] Fwd: ICS question

Michael J Rubinsky mrubinsk at horde.org
Sat Feb 6 15:54:14 UTC 2021


Quoting Ferdinand Gruber <fer.grub at yahoo.de>:

> Hi,
>
> I have been using the script kronolith-import-icals.php in a PHP  
> project for a long time to import events from a separate form into  
> thekronolith_events table.
>
> This is what the ICS file looks like that I am currently using
>
>     $ical =
>         "BEGIN:VCALENDAR".$eol.
>         "VERSION:2.0".$eol.
>         "BEGIN:VEVENT".$eol.
>         "DTSTART;TZID=Europe/Vienna:".$event_start.$eol.
>         "DTEND;TZID=Europe/Vienna:".$event_end.$eol.
>         "DTSTAMP:".time().$eol.
>         "UID:".$event_uid.$eol.
>         "SUMMARY:".$event_title.$eol.
>         "DESCRIPTION:".str_replace("\r\n", "\\n", $event_description).$eol.
>         "LOCATION:".$event_location.$eol.
>         "CLASS:PUBLIC".$eol.
>         "END:VEVENT".$eol.
>         "END:VCALENDAR".$eol;
>
> The variables are generated from the$_POST array.
>
>
> My question is: How can I put other fields, like the event_keywords  
> field into the ICS file.
>

You would add the appropriate icalendar field to your $ical string.  
E.g., for tags (keywords have been deprecated for some time now) you  
would add the "CATEGORIES" field. The iCalendar RFC will give you more  
information about the fields and format.  Alternatively you can look  
at Kronolith_Event::fromICalendar (in kronolith/lib/Event.php) to see  
which kronolith fields are pulled from which iCal field.

> -- 
> Regards from Austria
> Ferdinand Gruber
>
> -- 
> kronolith mailing list
> Frequently Asked Questions: http://wiki.horde.org/FAQ
> To unsubscribe, mail: kronolith-unsubscribe at lists.horde.org



-- 
mike
The Horde Project
http://www.horde.org
https://www.facebook.com/hordeproject
https://www.twitter.com/hordeproject
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 9272 bytes
Desc: PGP Public Key
URL: <https://lists.horde.org/archives/kronolith/attachments/20210206/9dc7a3df/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: PGP Digital Signature
URL: <https://lists.horde.org/archives/kronolith/attachments/20210206/9dc7a3df/attachment.sig>


More information about the kronolith mailing list