Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » generating ics (calendar) download

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1088 Views
  • StarForce
    Avatar
    Community Member
    11 Posts

    generating ics (calendar) download Link to this post

    Hi

    i´m trying to create a method which generates an ics file and sends it to the browser as a download. This is a first test i made:

    function calendar(){

    $test = 'BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:-//hacksw/handcal//NONSGML v1.0//EN
    BEGIN:VEVENT
    UID:uid1@example.com
    DTSTAMP:19970714T170000Z
    ORGANIZER;CN=John Doe:MAILTO:john.doe@example.com
    DTSTART:19970714T170000Z
    DTEND:19970715T035959Z
    SUMMARY:Bastille Day Party
    END:VEVENT
    END:VCALENDAR';

    return SS_HTTPRequest::send_file($test, "calendar.ics","text/calendar");
    }

    but for some reasons it doesn´t work. when calling this method, the browser only displays the text, no download :/

    any idea?

    Thank you

    StarForce

  • StarForce
    Avatar
    Community Member
    11 Posts

    Re: generating ics (calendar) download Link to this post

    hmm no idea?

    should be possible to create a simple download :/

    1088 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.