From: Greg W. <php...@gr...> - 2005-03-02 14:52:03
|
A couple of comments: First, I think that a UNIX timestamp or some other form that includes as much information as possible should be sent in the RSS. That way, people can decide for themselves how to display the date and/or time. Having it automatically inserted in the title in a particular format (Jim's solution) or even just displayed in a format that doesn't include the year (Ben's) makes it more awkward to format it yourself. I think it's probably trivial to reformat it with date() and strtotime(), but one way or another we should pick a date format and stick to it, so code doesn't have to be rewritten each time. Second, I tried to send a comment about this earlier, but my e-mails from a non-subscribed address haven't (I don't think) been approved yet: the last time I checked, if you set up a 'daysfrom' RSS feed using Jim's solution that spans less than 100 days, it won't work properly when it reaches the end of the month. This is because dates in PHPiCalendar seem to rely on being in a format that makes months 100 days. I can't figure out how to get the information about how long a given month actually is. Anyways, Jim may have fixed this with a change he made earlier this week, but I haven't tested it yet. Thanks for working on this; it's a great addition to PHPiCalendar. Greg Westin -- http://www.gregwestin.com Contact info: http://www.gregwestin.com/contact.php On Mar 2, 2005, at 5:25 AM, Ben Francis wrote: > 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 > ---------------------------------------------------- > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Phpicalendar-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel |