From: Ben F. <li...@hi...> - 2005-03-02 11:24:56
|
Jim Hu wrote: > I added those fields because the ones in the release didn't have some > information I wanted. I probably should have removed them or named > them something more general before posting it (Sorry, Chad!)... Right, I've hacked around with your version of rss.php and it's now generating yet another different XML document, where an item looks like: <item> <uid>5E2CE264-8A5F-11D9-AC32-000D936C280E-RID</uid> <title>recurring event</title> <link>http://www.catmosearts.co.uk:80/calendar/week.php?getdate=20050302&cal=exhibitions</link> <description>with description</description> <calname>exhibitions</calname> <starttime>6:45 PM</starttime> <endtime>7:45 PM</endtime> <startdate>March 2</startdate> <enddate>March 5</enddate> </item> Where end date is the end date of a recurring event, UID is grabbed for each item from the array key and other fields are hacked around a little for my needs. It's a bit of a pain that the iCal parser doesn't include a year in the $master_array["recur"]["UNTIL"] - wouldn't it be better to use a UNIX time or "20050302" consistently for everything? In fact, why doesn't it break when you have a recurring event covering several years? > I uploaded my version to provide the date range capability, and to > show how this could be used to have a single code block generate the > feed, instead of different ones for day, week, and month. OK, that should be good. But assuming I get that working, I have one more problem. rss.php generates an XML <item> for every occurence of a recurring event. I only want one <item> which states the start date and end date for an event. > As modified by me, the rss feed does not conform to an RDF calendar > specification where the tag names are registered and so on. When I > tried to read about calendar rss specifications, it seemed like the > standards were not well defined at the time (about 9 months > ago?)...and/or it was too confused for an amateur like me to understand! I also tried to look for an RDF calendar specification, got thoroughly confused and gave up and just did my own XML setup. Anyone want to do this? > Hope this helps... Yes, thank you. It does seem a little odd changing from .ics to an array to XML, back to an array but it works! And if I'm right magpierss will cache it all as well so the calendar file doesn't have to be parsed every time. > and anyone out there who understands RDF better should suggest how to > make things compliant! tola -- Ben "tola" Francis http://hippygeek.co.uk ---------------------------------------------------- COMPUTER SUPPORT for small businesses and home users http://tolatech.co.uk ---------------------------------------------------- |