From: Chad <ch...@ch...> - 2002-10-16 02:40:53
|
Since Jared and I don't have access to Moz Calendar (though I could I suppose) we hadn't planned support until 0.9 or so. My thoughts are that adapting the parser would be pretty simple once we had gotten all the logic down. If I have some time tonight I'll look at putting my PC back together. We can make mozilla the top item for 0.8. In the meantime I'd prefer us stick to the roadmap for the next release. I'd like to have it out by sunday night. Although I think I've lost Jared's help to homework. ;-) I'm sure the roadmap is somewheres in the mailing list archives. -C On Tuesday, October 15, 2002, at 07:29 PM, Waitman C. Gobble wrote: > hello! > > please review the following unfolding code. according to rfc 2445, each > line in the ics file must be 75 octets or less in length. each line is > to terminated by CRLF. if the data portion causes the particular line > to > exceed 75 octets, then the line is to broken, with the excess placed on > the following line(s) and preceded by a single space (ascii 32) or htab > (ascii 9). > > (sheesh, i bet that made the unix and mac ppl happy, but hey look... a > guy at microsoft co-authored the rfc... now can someone tell me why > outlook doesn't do this right?) > > anyhow, i think this unfolding business is the reason that the existing > phpicalendar scripts wouldn't read the mozilla files. i posted a > quick-fix on the forum but i bet it wouldn't read multiple-multiple > lines, ie if the particular line was long enough to exceed two lines. > > i tested it on a mozilla ics and an apple ics i found at apple.com > if somebody has a really good one with lots of text in the > descriptions, > that would be super-cool. > > <?php > > //$ical_file="/53073H4/calenders/kristi.ics"; > $ical_file="/53073H4/calenders/Premieres32Pacific.ics"; > > //need file name in $ical_file > $errstr=""; > > if (!@file_exists($ical_file)) > { > > $errstr="The file does not exist."; > > } else { > > //unfold file > > $folded=@file($ical_file); > $unfolded = array(); > $buffer = ""; > for ($jj=0;$jj<count($folded);$jj++) > { > if (strlen($folded[$jj])>0) > { > if ( (ord(substr($folded[$jj],0,1))==32) || > (ord(substr($folded[$jj],0,1))==9) ) > { > $buffer .= substr($folded[$jj],1,strlen($folded[$jj])-1); > } else { > if (strlen($buffer)>0) > { > $unfolded[]=$buffer; > } > $buffer=$folded[$jj]; > } > } > } > } > > //remove linefeeds and carriage returns > > for ($jj=0;$jj<count($unfolded);$jj++) > { > $unfolded[$jj] = @ereg_replace("\n","",$unfolded[$jj]); > $unfolded[$jj] = @ereg_replace("\r","",$unfolded[$jj]); > } > print_r($unfolded); > > > ?> > > > > thanks > > waitman > > > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: viaVerio will pay you up to > $1,000 for every account that you consolidate with us. > http://ad.doubleclick.net/clk;4749864;7604308;v? > http://www.viaverio.com/consolidator/osdn.cfm > _______________________________________________ > Phpicalendar-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel |