Need to be able to export events to calendar (.ics)

This topic contains 1 reply, has 1 voice, and was last updated by  urbanfix 7 years, 10 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #216358

    urbanfix
    Expired Member
    Post count: 310

    I basically want a php query i can add to my functions php or a plugin (widget)..
    I believe you just need to add in the relevant gd fields..
    (and a link to trigger this..!)

    
    
    var todayDate	= new Date();
    var msgData	= todayDate.toISOString();
    var startDate	= e.start.toISOString();
    var endDate	= e.end.toISOString();
    
    var icsMSG1 = "BEGIN:VCALENDARrnVERSION:2.0rnPRODID:https://www.google.com/rnBEGIN:VEVENTrnUID:https://www.google.com/rnDTSTAMP:" + msgData + "ZrnDTSTART:" + startDate + "rn";
    
    var icsMSG2 = '';
    if(endDate != '') {
        icsMSG2 = "DTEND:" + endDate +"rn";
    }
    
    icsMSG3 = "SUMMARY:" + title + "rnEND:VEVENTrnEND:VCALENDAR";
    
    icsMSG = icsMSG1 + icsMSG2 + icsMSG3;
    
    $('.test-ics').click(function(){
        window.open( "data:text/calendar;charset=utf8," + escape(icsMSG));
    });

    Let me know how much! thanks 🙂

    #216359

    urbanfix
    Expired Member
    Post count: 310
Viewing 2 posts - 1 through 2 (of 2 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket