Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2017-11-08 16:13:58

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 2,616
Website

Re: Outputting a valid .ics file from an Event for download

I sent you a couple of further ideas to try out in reply to your email.


TXP Builders – finely-crafted code, design and txp

Offline

#32 2017-11-08 17:45:31

lythande
Member
Registered: 2009-09-08
Posts: 144
Website

Re: Outputting a valid .ics file from an Event for download

Much thanks for supporting by Email!
Now works!!! :-)

How I solve it:

1. Create an Event in my own Calendar with all Information, what I do have wish inside. (URL, Description…)

2. Drop this Event to Desktop or in a File. Open it with a Texteditor.

3. Compare the calendar-Event with the forms icsitem and rah_eo_generate-ics.

I have compare both and have seen, that my text was in wrong order. After I corrected the order, it works! :-)

I have made two new custom_fields, because one for the url to the long article and another with the right Title for the calendar (and not the title from article).

Here is my .ics-file:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Apple Inc.//Mac OS X 10.8.5//EN
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
DTSTART:19700329T020000
TZNAME:MEZ
TZOFFSETTO:+0200
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
DTSTART:19701025T030000
TZNAME:MEZ
TZOFFSETTO:+0100
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20171108T002911Z
UID:2017-11-07T23:29:11Z@http://mydomain.de/
DTEND;TZID=Europe/Berlin:20180217T163000
TRANSP:OPAQUE
SUMMARY:(Title for Calendar)
DTSTART;TZID=Europe/Berlin:20180217T150000
DTSTAMP:20171108T002911Z
LOCATION:Bundeskunsthalle Bonn
DESCRIPTION:Teilnahme nur nach Anmeldung bis 3 Tage vorher möglich!
URL;VALUE=URI:http://mydomain.de/url...
END:VEVENT
END:VCALENDAR

Offline

#33 2017-11-08 18:29:38

lythande
Member
Registered: 2009-09-08
Posts: 144
Website

Re: Outputting a valid .ics file from an Event for download

Hm, it works with more Event-Articles too. But: the .ics-file contains all events and not the one from the one article. So the download is for all articles.
How I can create, that both article have two different .ics-files, one .ics for a single article?

Sure, I wish to have a .ics-File with all events too, thats no problem! :-)
But maybe the .ics-file is different between two languages in the event, so that one .ics is with english-events and the other .ics with german-events.
I think, I must work with a 3rd category for say, in which language is the event. I using the category2 to choose the language.

Last edited by lythande (2017-11-08 20:15:58)

Offline

#34 2017-11-10 19:53:21

lythande
Member
Registered: 2009-09-08
Posts: 144
Website

Re: Outputting a valid .ics file from an Event for download

Much thanks Jakob! Now I can output in a .ics: single event, all event, and all events from each language!
Now works, thanks a lot! :-)

Offline

#35 2017-11-15 09:54:58

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 2,616
Website

Re: Outputting a valid .ics file from an Event for download

colak wrote #307686:

this would be an excellent howto for txptips …

I’ve written this up now as a txptip, and tried to generalise the situation a little:

» Outputting an .ics calendar file from a Textpattern article

Thanks to lythande for her help and for providing me with her setup to test it. We’ve not yet tried how it works with different calendar apps and OSes, so any feedback for improving the .ics output would be helpful. Finally, I hope the tutorial is useful :-)


TXP Builders – finely-crafted code, design and txp

Offline

#36 2017-11-15 14:37:14

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,388
Website

Re: Outputting a valid .ics file from an Event for download

Thanks to jakob for the excellent tutorial, and hope it benefits some members of the community! Textpattern Tips is always open for new and exciting content, keep it coming :)

Offline

Board footer

Powered by FluxBB