Problem you are having:
I hope it is ok to ask this request here. I am a big fan of baikal as a calendar and for years I've had this integrated into a calendar for an application I develop and support using FullCalendar. It is great.
My challenge is I do not think I'm efficiently pulling data from a user VEVENT/VTODO. It is old code years ago when I was learning, but it is an ajax request calling curl from a PHP file using XML components.
The problem I am having is dealing with the XML in javascript. When I am at the '' which the properties are a string, it is difficult to break them apart.
example:
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:America/Toronto
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
CREATED:20221212T135415Z
LAST-MODIFIED:20230609T172856Z
DTSTAMP:20230609T172856Z
UID:0099d7ed-06cb-4422-9e61-6486d656f635
SUMMARY: title text
X-MOZ-LASTACK:20230609T172856Z
DTSTART;TZID=America/Toronto:20230609T080000
DTEND;TZID=America/Toronto:20230609T090000
TRANSP:OPAQUE
DESCRIPTION;ALTREP="data:text/html,":text...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...texttext...text
SEQUENCE:1
X-MOZ-GENERATION:2
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER:-PT15M
DESCRIPTION:Default Mozilla Description
END:VALARM
END:VEVENT
END:VCALENDAR
I cannot breakdown the properties properly. I was actually using `.split('\n')`, but DESCRIPTION property with DESCRIPTION;ALTREP= hold HTML that can screw this up, and I am sure this really is the best idea.
So I was thinking that maybe my best approach is from the PHP file and use similar to this example:
`use Sabre\VObject;
include 'vendor/autoload.php';
$vcalendar = VObject\Reader::read(
fopen('party.ics','r')
);
echo $vcalendar->VEVENT->SUMMARY;`
How can I use this with the XML I get back instead of putting the ics in there? IS there more documentation somewhere for this?
Baikal version: 0.9.4
Problem you are having: I hope it is ok to ask this request here. I am a big fan of baikal as a calendar and for years I've had this integrated into a calendar for an application I develop and support using FullCalendar. It is great.
My challenge is I do not think I'm efficiently pulling data from a user VEVENT/VTODO. It is old code years ago when I was learning, but it is an ajax request calling curl from a PHP file using XML components.
Example:
` $model = ['VEVENT', 'VTODO'];
foreach ($model as $component){
}//foreach ($model as $component)`
Suggested solution:
The problem I am having is dealing with the XML in javascript. When I am at the '' which the properties are a string, it is difficult to break them apart.
example: