From: David F. <da...@d2...> - 2005-05-03 16:08:29
|
for the day_start bug (patch + ics file included) I don't have a calendar on the web w/ the fix, but the ics file included will let you duplicate it. The patch/ics are attached as day_time.patch/day_time.ics. Basically, view the calendar in day/week mode before and after applying the patch, and after you should see the events switch order so the 6am one is listed first, then the 8am one. for the other (which I will include here as well) - it's a feature independant of the calendar, so you can "duplicate" w/ any calendar (or none). It turns the month/year title on the small/med month calendars into links to the month or year, respectively. So, if you're viewing may 23rd (day view), you could jump directly to the month view for april, may, or june. The year link is less useful, but I included it for completeness' sake. That patch is attached as "month_link.patch". Both are against latest CVS. dave Jim Hu wrote: > David and Jamin, > > Chad or one of the others may respond sooner, but it sounds like I may > have broken something since I think I'm the last one to update the > relevant files. I'll try to look at the patches submitted soon...but > not until finals are over! In the meantime, do you guys have urls for > calendars that have your patches working? > > Jim Hu > > On May 2, 2005, at 10:17 PM, > php...@li... wrote: > >> Send Phpicalendar-devel mailing list submissions to >> php...@li... >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel >> or, via email, send a message with subject or body 'help' to >> php...@li... >> >> You can reach the person managing the list at >> php...@li... >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Phpicalendar-devel digest..." >> >> >> Today's Topics: >> >> 1. patch submission process (David Fallon) >> 2. WebCal display name patch and some comments (Jamin W. Collins) >> 3. Bug + Patch (David Fallon) >> 4. better to push raw or parsed data to event.php? (David Fallon) >> >> --__--__-- >> >> Message: 1 >> Date: Mon, 02 May 2005 13:21:41 -0700 >> From: David Fallon <da...@d2...> >> To: php...@li... >> Subject: [PHPiCalendar-DEV] patch submission process >> Reply-To: php...@li... >> >> What's the best way to get patches reviewed by someone w/ cvs access? >> I've got a small patch that changes the month/year in the title of the >> various calendars to be links that display that month year, and I've got >> a few more minor tweaks/improvements that I'd like to contribute back. >> Should I mail the list w/ the patch? Add it to the patch-tracker thing >> on sf? >> >> dave >> >> >> --__--__-- >> >> Message: 2 >> Date: Mon, 2 May 2005 15:27:12 -0600 >> From: "Jamin W. Collins" <jco...@as...> >> To: php...@li... >> Subject: [PHPiCalendar-DEV] WebCal display name patch and some comments >> Reply-To: php...@li... >> >> >> --EVF5PPMfhYS0aIcm >> Content-Type: text/plain; charset=us-ascii >> Content-Disposition: inline >> >> [Sent this a few days ago but it doesn't appear to have made it to the >> list so I'm sending it again. Sorry if this results in a duplicate] >> >> I've been looking at using PHP iCalendar to display our iCal files for >> a short while now. One of the things I noticed is that the code relies >> on X-WR-CALNAME to provide the calendar name for the index. Without >> this, it looks like the code strips the .ics suffix and /'s from the >> webcal url and uses that for the name. This can lead to rather long >> and hideous calendar names and at this time Sunbird doesn't appear to >> set the X-WR-CALNAME attribute for the calendars it creates. In an >> effort to make the resulting calendar names more readable I've created >> the attached and referenced[1] (in case the list removes it) patch that >> instead uses the iCal file's base filename (without the .ics suffix). >> The patch could probably use a little cleaning up but it's worked well >> for us so far. >> >> Also, I've been looking at the recent CVS version and like the addition >> of the search option. However, it looks like the new CVS code >> introduces some display problems. For instance, events that span >> multiple days aren't displayed on any day but the day that they start. >> An example, we have a calendar listing the on call representative for >> the week. This representative starts their tour of duty on Monday at >> 7am and is relieved by the next representative the following Monday at >> 7am. Under the previous 2.0 beta release this was properly displayed >> (though some details were missing in the pop-up, see below). The >> current CVS appears to display this the same way the 1.1 release did, >> that is to show it only on the day that it started (Monday in this >> case). >> >> The 2.0 beta release while displaying it properly in the calendar view >> did not display useful information in the pop-up details. In the >> detailed window it listed the task duration as "(7:00 - 7:00 AM)". As >> this event spans multiple days it would be very useful to include the >> date for each of these times. >> >> [1] - http://asgardsrealm.net/~jcollins/patches/ical-displayname.patch >> >> -- >> Jamin W. Collins >> >> This is the typical unix way of doing things: you string together lots >> of very specific tools to accomplish larger tasks. -- Vineet Kumar >> >> --EVF5PPMfhYS0aIcm >> Content-Type: text/plain; charset=us-ascii >> Content-Disposition: attachment; filename="ical-displayname.patch" >> >> Index: functions/ical_parser.php >> =================================================================== >> RCS file: /cvsroot/phpicalendar/phpicalendar/functions/ical_parser.php,v >> retrieving revision 1.186 >> diff -u -r1.186 ical_parser.php >> --- functions/ical_parser.php 9 Nov 2004 20:53:11 -0000 1.186 >> +++ functions/ical_parser.php 29 Apr 2005 17:52:17 -0000 >> @@ -102,6 +102,8 @@ >> $actual_calname = str_replace($calendar_path, '', $filename); >> $actual_calname = str_replace('/', '', str_replace('.ics', '', >> $actual_calname)); >> >> + $basecalfile = basename($filename, '.ics'); >> + >> if ($parse_file) { >> >> // Let's see if we're doing a webcal >> @@ -129,6 +131,7 @@ >> >> // Set default calendar name - can be overridden by X-WR-CALNAME >> $calendar_name = $cal_filename; >> + $calendar_name = $basecalfile; >> $master_array['calendar_name'] = $calendar_name; >> >> // read file in line by line >> @@ -1136,7 +1139,8 @@ >> } >> } >> } >> - if (!isset($master_array['-3'][$calnumber])) >> $master_array['-3'][$calnumber] = $actual_calname; >> + //if (!isset($master_array['-3'][$calnumber])) >> $master_array['-3'][$calnumber] = $actual_calname; >> + if (!isset($master_array['-3'][$calnumber])) >> $master_array['-3'][$calnumber] = $basecalfile; >> if (!isset($master_array['-4'][$calnumber]['mtime'])) >> $master_array['-4'][$calnumber]['mtime'] = $actual_mtime; >> if (!isset($master_array['-4'][$calnumber]['filename'])) >> $master_array['-4'][$calnumber]['filename'] = $filename; >> if (!isset($master_array['-4'][$calnumber]['webcal'])) >> $master_array['-4'][$calnumber]['webcal'] = 'no'; >> >> --EVF5PPMfhYS0aIcm-- >> >> >> --__--__-- >> >> Message: 3 >> Date: Mon, 02 May 2005 17:35:12 -0700 >> From: David Fallon <da...@d2...> >> To: php...@li... >> Subject: [PHPiCalendar-DEV] Bug + Patch >> Reply-To: php...@li... >> >> This is a multi-part message in MIME format. >> --------------050100000003040401060703 >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> Content-Transfer-Encoding: 7bit >> >> While working on some other stuff, found a bug in the day & week display: >> >> My $day_start is set to 0800. I have a calendar w/ 2 events, 1 from 6am >> - 5pm, and the other from 8am - 7pm. The exact times don't matter, other >> than that there's a event that starts at $day_start, and an event that >> starts before $day_start. The bug was the events I just described be >> shown in the wrong order, the 8am one first and the 6am one second. This >> was due to how the $this_time_arr was being built - it was appending >> instead of building the events and prepending (you couldn't just always >> prepend, because then if there were multiple events before $day_start, >> you'd get them in reverse order). Should be relatively self-explanatory. >> Files attached: >> >> bug_example.ics - demo ics that shows this. >> bug.patch - diff -u against latest cvs. >> >> Still waiting to hear about the right way to do this (i.e., what will >> get someone with cvs access to review/commit - I will happily mail >> floppys if that's what it takes. ;)), but figured given the trivial >> nature of the patches, this wouldn't be too bad. >> >> dave >> >> --------------050100000003040401060703 >> Content-Type: text/plain; >> name="bug.patch" >> Content-Transfer-Encoding: 7bit >> Content-Disposition: inline; >> filename="bug.patch" >> >> Index: functions/template.php >> =================================================================== >> RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v >> retrieving revision 1.65 >> diff -u -r1.65 template.php >> --- functions/template.php 16 Apr 2005 20:39:00 -0000 1.65 >> +++ functions/template.php 3 May 2005 00:25:23 -0000 >> @@ -352,17 +352,23 @@ >> } >> >> if ($day_start == $cal_time && >> isset($master_array[$thisday]) && is_array($master_array[$thisday])) { >> + unset ($pre_day_start_events); >> foreach($master_array[$thisday] as $time_key => >> $time_arr) { >> if ((int)$time_key < (int)$cal_time && >> is_array($time_arr) && $time_key != '-1') { >> foreach($time_arr as $event_tmp) { >> if ((int)$event_tmp['event_end'] > >> (int)$cal_time) { >> - $this_time_arr[] = $event_tmp; >> + // Use this to correctly prepend >> events to this_time_arr, so the event >> + // with the earliest start time >> is listed first. >> + $pre_day_start_events[] = >> $event_tmp; >> } >> } >> } else { >> break; >> } >> } >> + if ($pre_day_start_events) { >> + $this_time_arr = >> array_merge($pre_day_start_events, $this_time_arr); >> + } >> } >> >> >> @@ -555,17 +561,23 @@ >> >> // add events that overlap $day_start instead of cutting >> them out completely >> if (($day_start == $cal_time) && >> (isset($master_array[$getdate]))) { >> + unset ($pre_day_start_events); >> foreach($master_array[$getdate] as $time_key => >> $time_arr) { >> if ((int)$time_key < (int)$cal_time && >> is_array($time_arr) && $time_key != '-1') { >> foreach($time_arr as $event_tmp) { >> if ((int)$event_tmp['event_end'] > >> (int)$cal_time) { >> - $this_time_arr[] = $event_tmp; >> + // Use this to correctly prepend >> events to this_time_arr, so the event >> + // with the earliest start time is >> listed first. >> + $pre_day_start_events[] = $event_tmp; >> } >> } >> } else { >> break; >> } >> } >> + if ($pre_day_start_events) { >> + $this_time_arr = >> array_merge($pre_day_start_events, $this_time_arr); >> + } >> >> } >> >> // check for eventstart >> >> --------------050100000003040401060703 >> Content-Type: text/calendar; >> name="bug_example.ics" >> Content-Transfer-Encoding: 7bit >> Content-Disposition: inline; >> filename="bug_example.ics" >> >> BEGIN:VCALENDAR >> VERSION >> :2.0 >> PRODID >> :-//Mozilla.org/NONSGML Mozilla Calendar V1.0//EN >> BEGIN:VEVENT >> UID >> :3a65895e-1dd2-11b2-80c2-f385b967768a >> SUMMARY >> :Vince working >> CATEGORIES >> :Business >> STATUS >> :CONFIRMED >> CLASS >> :PUBLIC >> X-MOZILLA-ALARM-DEFAULT-LENGTH >> :10 >> RRULE >> :FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR >> EXDATE >> :20050221T000000 >> DTSTART >> :20050103T060000 >> DTEND >> :20050103T170000 >> DTSTAMP >> :20050219T005638Z >> LAST-MODIFIED >> :20050219T011446Z >> END:VEVENT >> BEGIN:VEVENT >> UID >> :bf43fde6-1dd1-11b2-8661-d2f17f4e1e6c >> SUMMARY >> :Tram working >> STATUS >> :CONFIRMED >> CLASS >> :PUBLIC >> X-MOZILLA-ALARM-DEFAULT-LENGTH >> :10 >> RRULE >> :FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR >> DTSTART >> :20050328T080000 >> DTEND >> :20050328T190000 >> DTSTAMP >> :20050328T171320Z >> END:VEVENT >> END:VCALENDAR >> >> --------------050100000003040401060703-- >> >> >> --__--__-- >> >> Message: 4 >> Date: Mon, 02 May 2005 19:05:56 -0700 >> From: David Fallon <da...@d2...> >> To: php...@li... >> Subject: [PHPiCalendar-DEV] better to push raw or parsed data to >> event.php? >> Reply-To: php...@li... >> >> In prep for some future stuff, and because it seems useful to have, I'm >> adding the recurrence info to the event.php popup page. So, after some >> head-scratching to understand how data is passed around, it looks like >> it would be easier for me to generate the correct string for the >> recurrence in day.php/month.php/etc. (correct string being "every week, >> mon-fri", or "every 2 days, except 3/1/05") But before going down that >> road, wanted to check if there was a preference on instead passing the >> raw recur data to event.php, and having the parsing logic there. >> >> This will lead to various localization issue, it seems, but I haven't >> gotten far enough yet to understand what. (other than the obvious >> "there's a new label in event.php to translate"). >> >> dave >> >> >> >> --__--__-- >> >> _______________________________________________ >> Phpicalendar-devel mailing list >> Php...@li... >> https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel >> >> >> End of Phpicalendar-devel Digest > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: NEC IT Guy Games. > Get your fingers limbered up and give it your best shot. 4 great events, 4 > opportunities to win big! Highest score wins.NEC IT Guy Games. Play to > win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20 > _______________________________________________ > Phpicalendar-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel > |