You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(159) |
Nov
(123) |
Dec
(27) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(6) |
Feb
(11) |
Mar
(21) |
Apr
(29) |
May
(13) |
Jun
(2) |
Jul
(13) |
Aug
(5) |
Sep
(14) |
Oct
(21) |
Nov
(71) |
Dec
|
2004 |
Jan
(18) |
Feb
(12) |
Mar
|
Apr
(6) |
May
(29) |
Jun
(9) |
Jul
(3) |
Aug
(4) |
Sep
(7) |
Oct
(6) |
Nov
|
Dec
(20) |
2005 |
Jan
(6) |
Feb
(27) |
Mar
(4) |
Apr
(16) |
May
(61) |
Jun
(6) |
Jul
(4) |
Aug
(18) |
Sep
(19) |
Oct
(5) |
Nov
(55) |
Dec
(30) |
2006 |
Jan
(11) |
Feb
(9) |
Mar
(9) |
Apr
(26) |
May
(17) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(20) |
Oct
|
Nov
(6) |
Dec
(9) |
2007 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
(8) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
(17) |
Mar
(11) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(7) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(4) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David F. <da...@d2...> - 2005-05-06 02:22:06
|
upon further review, the right answer is twofold - I change ical_parser to be a little more generous w/ bleed_time, and then I changed the default of bleed_time to "off" - '-1'. This is because, as it stands, the whole point of bleed_time is to not display multi-day events past the first day, if they're before bleed_time. Since the default is day_start, any 3 day events that end before bleed_time won't show up, and things are working "correctly" in that if you specifically set bleed_time to day_start, you'd get what you're looking for. However, that's not what the users who don't set bleed_time expect - they expect no "filtering" of their events, I think. So, does that make sense? Can someone with the know-how buy off on this, and I'll commit the patch? Jamin, you can test this by turning bleed_time off - let me know if there are still rendering issues when you do that. Attached is a patch to do the above, btw. dave Jamin W. Collins wrote: > On Thu, May 05, 2005 at 10:43:24AM -0700, David Fallon wrote: > >>Hmm, that's odd. I just tried this out, and it seems to render properly. >>I have both an allday event spanning multiple days, and an event that >>went from 10am thursday to 11am sunday. Both seemed to display fine - >>the only "weirdness" was on the day view on friday/sat, the times listed >>for the event were 12:am -> 11am (not the actual start, just the start >>in the day). That's semi-bogus, but I'm not sure what the 'intent' there >>is. If that is a bug, let me know and I'll fix it. It'd also be nice if >>it listed the date for events that ran into other days, so you knew just >>how long it is, but that's how it's worked. Can you post a calendar and >>explain in more detail, so I can fix it? > > > Take a look here: > http://asgardsrealm.net/~jcollins/phpicalendar/ > > Calendar files are here: > http://asgardsrealm.net/~jcollins/phpicalendar/calendars/Home.ics > http://asgardsrealm.net/~jcollins/phpicalendar/calendars/Work.ics > > This seems to be a problem with parsing a file created by Sunbird. I > tried replicating this using iCal under OS X and was unable to do so. > |
From: David F. <da...@d2...> - 2005-05-06 02:11:54
|
So, upon further investigation, I found the problem - it specifically was when you had multi-day events that ran until $day_start - this should have been a problem before anything we did recently w/ template.php. $bleed_time is generally broken, and I think I have a handle on how to fix - patch forthcoming tomorrow. I also comitted the language fix, my first patch! Woo! Please let me know if I've completely trashed CVS. :) dave Jamin W. Collins wrote: > On Thu, May 05, 2005 at 10:43:24AM -0700, David Fallon wrote: > >>Hmm, that's odd. I just tried this out, and it seems to render properly. >>I have both an allday event spanning multiple days, and an event that >>went from 10am thursday to 11am sunday. Both seemed to display fine - >>the only "weirdness" was on the day view on friday/sat, the times listed >>for the event were 12:am -> 11am (not the actual start, just the start >>in the day). That's semi-bogus, but I'm not sure what the 'intent' there >>is. If that is a bug, let me know and I'll fix it. It'd also be nice if >>it listed the date for events that ran into other days, so you knew just >>how long it is, but that's how it's worked. Can you post a calendar and >>explain in more detail, so I can fix it? > > > Take a look here: > http://asgardsrealm.net/~jcollins/phpicalendar/ > > Calendar files are here: > http://asgardsrealm.net/~jcollins/phpicalendar/calendars/Home.ics > http://asgardsrealm.net/~jcollins/phpicalendar/calendars/Work.ics > > This seems to be a problem with parsing a file created by Sunbird. I > tried replicating this using iCal under OS X and was unable to do so. > |
From: Jamin W. C. <jco...@as...> - 2005-05-05 22:20:36
|
On Thu, May 05, 2005 at 10:43:24AM -0700, David Fallon wrote: > Hmm, that's odd. I just tried this out, and it seems to render properly. > I have both an allday event spanning multiple days, and an event that > went from 10am thursday to 11am sunday. Both seemed to display fine - > the only "weirdness" was on the day view on friday/sat, the times listed > for the event were 12:am -> 11am (not the actual start, just the start > in the day). That's semi-bogus, but I'm not sure what the 'intent' there > is. If that is a bug, let me know and I'll fix it. It'd also be nice if > it listed the date for events that ran into other days, so you knew just > how long it is, but that's how it's worked. Can you post a calendar and > explain in more detail, so I can fix it? Take a look here: http://asgardsrealm.net/~jcollins/phpicalendar/ Calendar files are here: http://asgardsrealm.net/~jcollins/phpicalendar/calendars/Home.ics http://asgardsrealm.net/~jcollins/phpicalendar/calendars/Work.ics This seems to be a problem with parsing a file created by Sunbird. I tried replicating this using iCal under OS X and was unable to do so. -- Jamin W. Collins Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo |
From: Jim Hu <ji...@ta...> - 2005-05-05 21:43:37
|
Well, Chad, for one of the first things you wrote in PHP, phpicalendar is remarkably well done, IMHO. Moreover, I think a lot of people have found it to be incredibly useful, despite whatever minor problems we find. Just Google phpicalendar and look at all the hits - both users and people saddened by the site being down. I'm far from being a proficient programmer and I'm glad that I have been able to help around here. I've also learned a huge amount about php from working with your code...and I hope that any changes I've made in the various updates haven't done too much violence to the original vision (for example, I think that some of the stuff I put into rss.php for my own use really needs to be expunged...I really need to learn more about RSS, XML, and validation of both of these). I look forward to learning about OO programming in php as things move forward! Jim On May 5, 2005, at 2:56 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. new developer added (Chad Little) > 2. openevent/event.php cleanup (David Fallon) > > --__--__-- > > Message: 1 > To: Dev List <php...@li...> > From: Chad Little <ch...@ch...> > Date: Thu, 5 May 2005 12:02:41 -0700 > Subject: [PHPiCalendar-DEV] new developer added > Reply-To: php...@li... > > > --Apple-Mail-4--426391869 > Content-Transfer-Encoding: 7bit > Content-Type: text/plain; > charset=US-ASCII; > delsp=yes; > format=flowed > > Hello, > > We've added David Fallon to the list of developers. I'd like to thank > him (and Jim) for their efforts in continuing the project during my > waves of interest. I will be putting the site back up later this > month, which I think many will be thankful for. > > PHP ICalendar was one of the first things I wrote while learning PHP, > and it's age is starting to show. I've overhauled a good bit of the > template, html, and css for 2.0, but its not perfect. I'd love it if > we could focus on getting in the already provided patches in > sourceforge, as well as looking at a few of the bugs that are there. > We'd then be able to get out a new release to go up with the new > site. Once we get the next release out I think that would be the best > time to look at serious restructuring of ical_parser and moving it to > a class, with DB support. > > -chad > --Apple-Mail-4--426391869 > Content-Transfer-Encoding: base64 > Content-Type: application/pkcs7-signature; > name=smime.p7s > Content-Disposition: attachment; > filename=smime.p7s > > MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGhTC > CAz4w > ggKnoAMCAQICAw1wWTANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChM > cVGhh > d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZ > yZWVt > YWlsIElzc3VpbmcgQ0EwHhcNMDQxMTE2MjAyNDUzWhcNMDUxMTE2MjAyNDUzWjCBiTEfMB0 > GA1UE > AxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEfMB0GCSqGSIb3DQEJARYQbGl0dGxlQGFwcGx > lLmNv > bTEjMCEGCSqGSIb3DQEJARYUY2hhZEBjaGFkc2RvbWFpbi5jb20xIDAeBgkqhkiG9w0BCQE > WEWNs > aXR0bGVAYXBwbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0nAmPVW > e5qeR > NCgTGkF0RC9wUJ8/iDmtb0zFcwgWUDJUDvdRyQdEntTe2UQYiNwkoB/ > 7hXrxpkvK793Lio3pF7w6 > jE7oEmPh7aH+LcCLW2VobP4Ov1JlrXu4kQpItjDFm0SEHo2fplGFmkPp63tP2oMr0bT1wzH > FVZnD > py6yjrtGPQBajFsEvIBkHX7yYunF0Rr5FD5la5C8d6HWwZ0ZfPbmYIc5CXQ2VRj8/E5/ > I7TLJbKQ > gP4sP/ > PrQ25izwjE3C+AIOeBNm6cq900nvBfBLuEO7S5zPc8Uu9n6uwpBh+f+WY9r+uKgHuw88ph > LdlcMoZqPMjeRiDGWA8A+cIonwIDAQABo1YwVDBEBgNVHREEPTA7gRBsaXR0bGVAYXBwbGU > uY29t > gRRjaGFkQGNoYWRzZG9tYWluLmNvbYERY2xpdHRsZUBhcHBsZS5jb20wDAYDVR0TAQH/ > BAIwADAN > BgkqhkiG9w0BAQQFAAOBgQBfhqsZK4ZNjsC3WqIztpwqR/d7u/ > qSwRhvfh4jZQzGCsJf9NO6WedU > 07dheAN7S2H/ > xYtQJ2MJtq4BNC+z4jq8Ohno2uxVJIPi47PQALpbcB4OASL+PDWhWQNy7MAn2KgB > V50brEaFvu+9r9ssXjPKrV036xDl6hAwErn6KxJYgDCCAz8wggKooAMCAQICAQ0wDQYJKoZ > IhvcN > AQEFBQAwgdExCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAc > TCUNh > cGUgVG93bjEaMBgGA1UEChMRVGhhd3RlIENvbnN1bHRpbmcxKDAmBgNVBAsTH0NlcnRpZml > jYXRp > b24gU2VydmljZXMgRGl2aXNpb24xJDAiBgNVBAMTG1RoYXd0ZSBQZXJzb25hbCBGcmVlbWF > pbCBD > QTErMCkGCSqGSIb3DQEJARYccGVyc29uYWwtZnJlZW1haWxAdGhhd3RlLmNvbTAeFw0wMzA > 3MTcw > MDAwMDBaFw0xMzA3MTYyMzU5NTlaMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGU > gQ29u > c3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWw > gSXNz > dWluZyBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAxKY8VXNV+065yplaHmjAdQR > wnd/p > /6Me7L3N9VvyGna9fww6YfK/ > Uc4B1OVQCjDXAmNaLIkVcI7dyfArhVqqP3FWy688Cwfn8R+RNiQq > E88r1fOCdz0Dviv+uxg+B79AgAJk16emu59l0cUqVIUPSAR/p7bRPGEEQB5kGXJgt/ > sCAwEAAaOB > lDCBkTASBgNVHRMBAf8ECDAGAQH/ > AgEAMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwudGhh > d3RlLmNvbS9UaGF3dGVQZXJzb25hbEZyZWVtYWlsQ0EuY3JsMAsGA1UdDwQEAwIBBjApBgN > VHREE > IjAgpB4wHDEaMBgGA1UEAxMRUHJpdmF0ZUxhYmVsMi0xMzgwDQYJKoZIhvcNAQEFBQADgYE > ASIzR > UIPqCy7MDaNmrGcPf6+svsIXoUOWlJ1/TCG4+DYfqi2fNi/ > A9BxQIJNwPP2t4WFiw9k6GX6EsZkb > AMUaC4J0niVQlGLH2ydxVyWN3amcOY6MIE9lX5Xa9/ > eH1sYITq726jTlEBpbNU1341YheILcIRk1 > 3iSx0x1G/ > 11fZU8xggLnMIIC4wIBATBpMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUg > Q29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1 > haWwg > SXNzdWluZyBDQQIDDXBZMAkGBSsOAwIaBQCgggFTMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0 > BBwEw > HAYJKoZIhvcNAQkFMQ8XDTA1MDUwNTE5MDI0MVowIwYJKoZIhvcNAQkEMRYEFDcRPIJi3dq > Jkoa1 > ctBjxvvxn8+RMHgGCSsGAQQBgjcQBDFrMGkwYjELMAkGA1UEBhMCWkExJTAjBgNVBAoTHFR > oYXd0 > ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQZXJzb25hbCBGcmV > lbWFp > bCBJc3N1aW5nIENBAgMNcFkwegYLKoZIhvcNAQkQAgsxa6BpMGIxCzAJBgNVBAYTAlpBMSU > wIwYD > VQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGV > yc29u > YWwgRnJlZW1haWwgSXNzdWluZyBDQQIDDXBZMA0GCSqGSIb3DQEBAQUABIIBADvf4rc2XA9 > MBxkn > 7pBfgORI2wB/ > 6Un3bK34RhXbxDQKQIYmqXn4cFpVF3uqCK2d183PtvhOQVW5m2TTicJfuVtmjjV1 > 6cGSFl6RtABYbZmvbcjQiIT3duScl4FrdPRDlqCVvz9FNeeY69Pj2ymnZExOOgV1utFbOxt > /n2lb > ptLDmxXpboIzkSHv6H4R5kz+PZZdPPHQv/nQ7AXc/JiFhbGwGb/uO1ewDNWrdzyXZXk2m/ > Mfm9oe > PFwXnM9++ryw9OmPbEVq7IW/ > ZYgcTTDpXOw61r01ySt77hM2QVzk1p556rPkIPXO6VSGvaM2JiC4 > FeUgKsD0PY/C71veu7A9ax8AAAAAAAA= > > --Apple-Mail-4--426391869-- > > > --__--__-- > > Message: 2 > Date: Thu, 05 May 2005 12:54:04 -0700 > From: David Fallon <da...@d2...> > To: php...@li... > Subject: [PHPiCalendar-DEV] openevent/event.php cleanup > Reply-To: php...@li... > > This is a multi-part message in MIME format. > --------------020305090307080109000700 > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > Content-Transfer-Encoding: 7bit > > Attached is a borderline-2.0 worthy cleanup of openevent/event.php. It > simplifies the function by changing the data-passing to use the > date/time/uid to then lookup the event info in $master_array in > event.php, instead of passing the raw data. It's possibly a precursor > to > even more cleanup of that whole process, by turning the popups into > simple links instead of using the hidden form to pass data around. Note > this assumes that the UIDs are unique across calendars, which seems to > be a valid assumption given how $master_array is structured (if it's a > bogus assumption, then events with the same $uid are going to be > overwriting each other anyways). If this is valid, I should also clean > up how todo.php works (amusingly, in a totally different fashion, using > a base64-encoded get string. lends more validity to "the right way" > being removing the hidden form stuff completely, but it's a big enough > structure change I want to make sure there wasn't some other valid > reason I just don't know about for doing it). > > This patch also fixes an actual bug - the event.php popup should have > had the title be "$calname $lang['l_calendar']" - i.e., "US Holidays > Calendar" - it was using the old translation syntax, and thus was just > showing up as "US Holidays". > > Actually, this is probably worth going into 2.0, as I realized it's a > decently-smaller HTML render, as now all the event info isn't included > in the page for every event (twice). > > called openevent.patch > > look, diffstat says it's good! :) > > davef@rake-l:phpicalendar-working 539 > diffstat openevent.patch > functions/date_functions.php | 38 ++++------- > functions/draw_functions.php | 2 > functions/event.js | 30 ++------ > functions/ical_parser.php | 14 ++-- > functions/template.php | 148 > ++++++++++++++++++------------------------- > includes/event.php | 45 +++++-------- > templates/default/event.tpl | 2 > templates/default/header.tpl | 15 +--- > 8 files changed, 118 insertions(+), 176 deletions(-) > > I'm also working on a post-2.0 enhancement that adds human-readable > recurrence info to event.php. Cool feature, needs a decent amount more > work to support all the various ways recurrence info could exist. I > stuck the function that does this in ical_parser.php, which probably > isn't right. Please let me know if you'd like to see the > work-in-progress. > > dave > > --------------020305090307080109000700 > Content-Type: text/plain; > name="openevent.patch" > Content-Transfer-Encoding: 7bit > Content-Disposition: inline; > filename="openevent.patch" > > Index: functions/date_functions.php > =================================================================== > RCS file: > /cvsroot/phpicalendar/phpicalendar/functions/date_functions.php,v > retrieving revision 1.26 > diff -u -r1.26 date_functions.php > --- functions/date_functions.php 26 Oct 2004 19:12:29 -0000 1.26 > +++ functions/date_functions.php 5 May 2005 19:48:53 -0000 > @@ -162,44 +162,38 @@ > return $offset; > } > > -function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, > $pre_text, $post_text, $link_class, $url) { > +function openevent($event_date, $uid, $arr, $lines = 0, $length = 0, > $link_class = '', $pre_text = '', $post_text = '') { > + > $event_text = stripslashes(urldecode($arr["event_text"])); > if (empty($start)) { > $title = $event_text; > } else { > - $title = $start.' - '.$end.': '.$event_text; > + $title = $arr['event_start'].' - '.$arr['event_end'].': > '.$event_text; > } > # for iCal pseudo tag <http> comptability > - if > (ereg("<([[:alpha:]]+://)([^<>[:space:]]+)>",$event_text,$matches)) { > - $full_event_text = $matches[1] . $matches[2]; > + if > (ereg("<([[:alpha:]]+://)([^<>[:space:]]+)>",$event_text,$matches)) { > + $full_event_text = $matches[1] . $matches[2]; > $event_text = $matches[2]; > - } else { > + } else { > $full_event_text = $event_text; > $event_text = strip_tags($event_text, '<b><i><u>'); > } > > - if (isset($arr["organizer"])) $organizer = > addslashes($arr["organizer"]); > - if (isset($arr["attendee"])) $attendee = > addslashes($arr["attendee"]); > - if (isset($arr["location"])) $location = > addslashes($arr["location"]); > - if (isset($arr["status"])) $status = addslashes($arr["status"]); > - if (isset($arr["description"])) $description = > addslashes(stripslashes(urldecode($arr["description"]))); > - if (isset($arr["url"])) $url = > addslashes(stripslashes(urldecode($arr["url"]))); > - > - if (!empty($event_text)) { > + if (!empty($event_text)) { > if ($lines > 0) { > - $event_text = word_wrap($event_text, $wrap, $lines); > + $event_text = word_wrap($event_text, $length, $lines); > } > > - if ((!(ereg("([[:alpha:]]+://[^<>[:space:]]+)", $full_event_text, > $res))) || ($description)) { > - $escaped_event = addslashes($full_event_text); > - $escaped_calendar = addslashes($calendar_name); > - $escaped_start = addslashes($start); > - $escaped_end = addslashes($end); > + if ((!(ereg("([[:alpha:]]+://[^<>[:space:]]+)", $full_event_text, > $res))) || ($arr['description'])) { > + $escaped_date = addslashes($event_date); > + $escaped_time = addslashes($arr['event_start']); > + if (!$escaped_time) $escaped_time = -1; > + $escaped_uid = addslashes($uid); > // fix for URL-length bug in IE: populate and submit a hidden form > on click > static $popup_data_index = 0; > $return = " > <script language=\"Javascript\" type=\"text/javascript\"><!-- > - var eventData = new EventData('$escaped_event', > '$escaped_calendar', '$escaped_start', '$escaped_end', '$description', > '$status', '$location', '$organizer', '$attendee', '$url'); > + var eventData = new EventData('$escaped_date', '$escaped_time', > '$escaped_uid'); > document.popup_data[$popup_data_index] = eventData; > // --></script>"; > > @@ -210,9 +204,7 @@ > } > $return .= $pre_text.$event_text.$post_text.'</a>'."\n"; > } > - > + > return $return; > } > - > - > ?> > Index: functions/draw_functions.php > =================================================================== > RCS file: > /cvsroot/phpicalendar/phpicalendar/functions/draw_functions.php,v > retrieving revision 1.5 > diff -u -r1.5 draw_functions.php > --- functions/draw_functions.php 20 May 2004 06:04:14 -0000 1.5 > +++ functions/draw_functions.php 5 May 2005 19:48:53 -0000 > @@ -46,4 +46,4 @@ > } > return $str; > } > -?> > \ No newline at end of file > +?> > Index: functions/event.js > =================================================================== > RCS file: /cvsroot/phpicalendar/phpicalendar/functions/event.js,v > retrieving revision 1.13 > diff -u -r1.13 event.js > --- functions/event.js 12 Aug 2004 20:32:50 -0000 1.13 > +++ functions/event.js 5 May 2005 19:48:53 -0000 > @@ -4,16 +4,9 @@ > // populate the hidden form > var data = document.popup_data[num]; > var form = document.forms.eventPopupForm; > - form.elements.event.value = data.event; > - form.elements.cal.value = data.cal; > - form.elements.start.value = data.start; > - form.elements.end.value = data.end; > - form.elements.description.value = data.description; > - form.elements.status.value = data.status; > - form.elements.location.value = data.location; > - form.elements.organizer.value = data.organizer; > - form.elements.attendee.value = data.attendee; > - form.elements.url.value = data.url; > + form.elements.date.value = data.date; > + form.elements.time.value = data.time; > + form.elements.uid.value = data.uid; > > // open a new window > var w = window.open('', 'Popup', > 'scrollbars=yes,width=460,height=275'); > @@ -21,17 +14,10 @@ > form.submit(); > } > > -function EventData(event, cal, start, end, description, status, > location, organizer, attendee, url) { > - this.event = event; > - this.cal = cal; > - this.start = start; > - this.end = end; > - this.description = description; > - this.status = status; > - this.location = location; > - this.organizer = organizer; > - this.attendee = attendee; > - this.url = url; > +function EventData(date, time, uid) { > + this.date = date; > + this.time = time; > + this.uid = uid; > } > > function openTodoInfo(vtodo_array) { > @@ -45,4 +31,4 @@ > > document.popup_data = new Array(); > //--> > -</script> > \ No newline at end of file > +</script> > 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 5 May 2005 19:48:54 -0000 > @@ -462,7 +462,9 @@ > > > $master_array[($start_date)][($hour.$minute)][$uid]['recur'][$key] = > $wkst; > break; > case 'END': > - > + > + $recur = > $master_array[($start_date)][($hour.$minute)][$uid]['recur']; > + > // Modify the COUNT based on BYDAY > if ((is_array($byday)) && (isset($count))) { > $blah = sizeof($byday); > @@ -669,7 +671,7 @@ > $end_time2 = strtotime('+'.$diff_allday_days.' days', > $recur_data_time); > while ($start_time2 < $end_time2) { > $start_date2 = date('Ymd', $start_time2); > - $master_array[($start_date2)][('-1')][] = array > ('event_text' => $summary, 'description' => $description, 'location' > => $location, 'organizer' => serialize($organizer), 'attendee' => > serialize($attendee), 'calnumber' => $calnumber, 'calname' => > $actual_calname, 'url' => $url, 'status' => $status, 'class' => $class > ); > + $master_array[($start_date2)][('-1')][$uid] = array > ('event_text' => $summary, 'description' => $description, 'location' > => $location, 'organizer' => serialize($organizer), 'attendee' => > serialize($attendee), 'calnumber' => $calnumber, 'calname' => > $actual_calname, 'url' => $url, 'status' => $status, 'class' => > $class, 'recur' => $recur ); > $start_time2 = strtotime('+1 day', $start_time2); > } > } else { > @@ -699,7 +701,7 @@ > $until_check = $start_date_tmp.$time_tmp.'00'; > if ($abs_until > $until_check) { > $nbrOfOverlaps = checkOverlap($start_date_tmp, > $start_time_tmp, $end_time_tmp, $uid); > - $master_array[$start_date_tmp][$time_tmp][$uid] = > array ('event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, > 'display_end' => $display_end_tmp, 'start_unixtime' => > $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' > => $summary, 'event_length' => $length, 'event_overlap' => > $nbrOfOverlaps, 'description' => $description, 'status' => $status, > 'class' => $class, 'spans_day' => true, 'location' => $location, > 'organizer' => serialize($organizer), 'attendee' => > serialize($attendee), 'calnumber' => $calnumber, 'calname' => > $actual_calname, 'url' => $url) ; > + $master_array[$start_date_tmp][$time_tmp][$uid] = > array ('event_start' => $start_time_tmp, 'event_end' => $end_time_tmp, > 'display_end' => $display_end_tmp, 'start_unixtime' => > $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' > => $summary, 'event_length' => $length, 'event_overlap' => > $nbrOfOverlaps, 'description' => $description, 'status' => $status, > 'class' => $class, 'spans_day' => true, 'location' => $location, > 'organizer' => serialize($organizer), 'attendee' => > serialize($attendee), 'calnumber' => $calnumber, 'calname' => > $actual_calname, 'url' => $url, 'recur' => $recur) ; > } > $start_tmp = strtotime('+1 day',$start_tmp); > } > @@ -715,7 +717,7 @@ > $until_check = $recur_data_date.$hour.$minute.'00'; > if ($abs_until > $until_check) { > $nbrOfOverlaps = checkOverlap($recur_data_date, > $start_time, $end_time_tmp1, $uid); > - > $master_array[($recur_data_date)][($hour.$minute)][$uid] = array > ('event_start' => $start_time, 'event_end' => $end_time_tmp1, > 'display_end' => $display_end_tmp, 'start_unixtime' => > $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' > => $summary, 'event_length' => $length, 'event_overlap' => > $nbrOfOverlaps, 'description' => $description, 'status' => $status, > 'class' => $class, 'spans_day' => false, 'location' => $location, > 'organizer' => serialize($organizer), 'attendee' => > serialize($attendee), 'calnumber' => $calnumber, 'calname' => > $actual_calname, 'url' => $url); > + > $master_array[($recur_data_date)][($hour.$minute)][$uid] = array > ('event_start' => $start_time, 'event_end' => $end_time_tmp1, > 'display_end' => $display_end_tmp, 'start_unixtime' => > $start_unixtime_tmp, 'end_unixtime' => $end_unixtime_tmp, 'event_text' > => $summary, 'event_length' => $length, 'event_overlap' => > $nbrOfOverlaps, 'description' => $description, 'status' => $status, > 'class' => $class, 'spans_day' => false, 'location' => $location, > 'organizer' => serialize($organizer), 'attendee' => > serialize($attendee), 'calnumber' => $calnumber, 'calname' => > $actual_calname, 'url' => $url, 'recur' => $recur); > } > } > } > @@ -1176,7 +1178,7 @@ > //print_r($overlap_array); > //print_r($day_array); > //print_r($rrule_array); > -//print_r($recurrence_delete); > +//print_r($recurrence_delete); > //print '</pre>'; > > // Set a calender name for all calenders combined > @@ -1185,5 +1187,5 @@ > } > > $template_started = getmicrotime(); > - > + > ?> > Index: functions/template.php > =================================================================== > RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v > retrieving revision 1.68 > diff -u -r1.68 template.php > --- functions/template.php 5 May 2005 07:07:50 -0000 1.68 > +++ functions/template.php 5 May 2005 19:48:54 -0000 > @@ -264,17 +264,15 @@ > $loop_ad = trim($match1[1]); > $loop_begin = trim($match2[1]); > $loop_end = trim($match3[1]); > - foreach ($weekarray as $key => $get_date) { > + foreach ($weekarray as $get_date) { > $replace = $loop_begin; > $colspan = 'colspan="'.$nbrGridCols[$get_date].'"'; > $replace = str_replace('{COLSPAN}', $colspan, $replace); > if (is_array($master_array[$get_date]['-1'])) { > - foreach ($master_array[$get_date]['-1'] as $allday) { > + foreach ($master_array[$get_date]['-1'] as $uid => $allday) { > $event_calno = $allday['calnumber']; > - $event_calna = $allday['calname']; > - $event_url = $allday['url']; > if ($event_calno > $unique_colors) $event_calno = ($event_calno > - $unique_colors); > - $event = openevent($event_calna, '', '', $allday, 1, 11, '', > '', 'psf', $event_url); > + $event = openevent($get_date, $uid, $allday, 1, 11, 'psf'); > $loop_tmp = str_replace('{ALLDAY}', $event, $loop_ad); > $loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp); > $replace .= $loop_tmp; > @@ -365,7 +363,7 @@ > $thisday = date("Ymd", $thisdate); > $dayborder = 0; > unset($this_time_arr); > - > + > if ($day_start == $cal_time && isset($master_array[$thisday]) && > is_array($master_array[$thisday])) { > foreach($master_array[$thisday] as $time_key => $time_arr) { > if ((int)$time_key <= (int)$cal_time) { > @@ -424,18 +422,17 @@ > } else { > $emptyWidth = $nbrGridCols[$thisday]; > for ($i=0;$i<sizeof($event_length[$thisday]);$i++) { > - > + > $drawWidth = $nbrGridCols[$thisday] / > ($event_length[$thisday][$i]["overlap"] + 1); > $emptyWidth = $emptyWidth - $drawWidth; > switch ($event_length[$thisday][$i]["state"]) { > case "begin": > $event_length[$thisday][$i]["state"] = "started"; > - $event_start = > $this_time_arr[($event_length[$thisday][$i]["key"])]['start_unixtime']; > + $uid = $event_length[$thisday][$i]["key"]; > + $event_start = $this_time_arr[$uid]['start_unixtime']; > $event_start = date ($timeFormat_small, $event_start); > - $event_calno = > $this_time_arr[($event_length[$thisday][$i]['key'])]['calnumber']; > - $event_calna = > $this_time_arr[($event_length[$thisday][$i]['key'])]['calname']; > - $event_url = > $this_time_arr[($event_length[$thisday][$i]['key'])]['url']; > - $event_status = > strtolower($this_time_arr[($event_length[$thisday][$i]['key'])]['status > ']); > + $event_calno = $this_time_arr[$uid]['calnumber']; > + $event_status = strtolower($this_time_arr[$uid]['status']); > if ($event_calno > $unique_colors) $event_calno = > ($event_calno - $unique_colors); > if ($event_status != '') { > $confirmed = '<img src="images/'.$event_status.'.gif" > width="9" height="9" alt="" border="0" hspace="0" vspace="0" > /> '; > @@ -443,13 +440,9 @@ > $colspan_width = round((80 / $nbrGridCols[$thisday]) * > $drawWidth); > $weekdisplay .= '<td width="'.$colspan_width.'" rowspan="' . > $event_length[$thisday][$i]['length'] . '" colspan="' . $drawWidth . > '" align="left" valign="top" class="eventbg2_'.$event_calno.'">'."\n"; > > - $event_end = > $this_time_arr[($event_length[$thisday][$i]["key"])]["end_unixtime"]; > - if > (isset($this_time_arr[($event_length[$thisday][$i]["key"])]['display_en > d'])) $event_end = strtotime > ($this_time_arr[($event_length[$thisday][$i]["key"])]['display_end']); > - $event_end = date ($timeFormat, $event_end); > - > // Start drawing the event > - $event_temp = $loop_event; > - $event = openevent($event_calna, $event_start, $event_end, > $this_time_arr[($event_length[$thisday][$i]["key"])], > $week_events_lines, 25, '', '', 'ps', $event_url); > + $event_temp = $loop_event; > + $event = openevent($thisday, $uid, $this_time_arr[$uid], > $week_events_lines, 25, 'ps'); > $event_temp = str_replace('{EVENT}', $event, $event_temp); > $event_temp = str_replace('{EVENT_START}', $event_start, > $event_temp); > $event_temp = str_replace('{CONFIRMED}', $confirmed, > $event_temp); > @@ -457,7 +450,7 @@ > $weekdisplay .= $event_temp; > $weekdisplay .= '</td>'; > // End event drawing > - > + > break; > case "started": > break; > @@ -482,34 +475,30 @@ > } > $weekdisplay .= "</tr>\n"; > } > - > + > $this->page = preg_replace('!<\!-- loop row on -->(.*)<\!-- loop > event off -->!is', $weekdisplay, $this->page); > - > - > - > + > } > - > + > function draw_day($template_p) { > global $template, $getdate, $cal, $master_array, $unique_colors, > $daysofweek_lang, $week_start_day, $dateFormat_week_list, > $current_view, $day_array, $timeFormat, $gridLength, $day_start; > - > + > // Replaces the allday events > $replace = ''; > if (is_array($master_array[$getdate]['-1'])) { > preg_match("!<\!-- loop allday on -->(.*)<\!-- loop allday off > -->!is", $this->page, $match1); > $loop_ad = trim($match1[1]); > - foreach ($master_array[$getdate]['-1'] as $allday) { > + foreach ($master_array[$getdate]['-1'] as $uid => $allday) { > $event_calno = $allday['calnumber']; > - $event_calna = $allday['calname']; > - $event_url = $allday['url']; > if ($event_calno > $unique_colors) $event_calno = ($event_calno - > $unique_colors); > - $event = openevent($event_calna, '', '', $allday, 0, '', '', > '', '', $event_url); > + $event = openevent($getdate, $uid, $allday); > $loop_tmp = str_replace('{ALLDAY}', $event, $loop_ad); > $loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp); > $replace .= $loop_tmp; > } > } > $this->page = preg_replace('!<\!-- loop allday on -->(.*)<\!-- loop > allday off -->!is', $replace, $this->page); > - > + > // Replaces the daysofweek > preg_match("!<\!-- loop daysofweek on -->(.*)<\!-- loop daysofweek > off -->!is", $this->page, $match1); > $loop_dof = trim($match1[1]); > @@ -588,12 +577,12 @@ > } > } > } else { > - // add events that overlap the start time > - if (isset($master_array[$getdate][$cal_time]) && > sizeof($master_array[$getdate][$cal_time]) > 0) { > - $this_time_arr = $master_array[$getdate][$cal_time]; > + // add events that overlap the start time > + if (isset($master_array[$getdate][$cal_time]) && > sizeof($master_array[$getdate][$cal_time]) > 0) { > + $this_time_arr = $master_array[$getdate][$cal_time]; > + } > } > - } > - > + > // check for eventstart > if (isset($this_time_arr) && sizeof($this_time_arr) > 0) { > foreach ($this_time_arr as $eventKey => $loopevent) { > @@ -642,14 +631,15 @@ > switch ($event_length[$i]['state']) { > case 'begin': > $event_length[$i]['state'] = 'started'; > - $event_start = strtotime > ($this_time_arr[($event_length[$i]['key'])]['event_start']); > - $event_end = strtotime > ($this_time_arr[($event_length[$i]['key'])]['event_end']); > - if > (isset($this_time_arr[($event_length[$i]['key'])]['display_end'])) > $event_end = strtotime > ($this_time_arr[($event_length[$i]['key'])]['display_end']); > + $uid = $event_length[$i]['key']; > + $event_start = strtotime > ($this_time_arr[$uid]['event_start']); > + $event_end = strtotime ($this_time_arr[$uid]['event_end']); > + if (isset($this_time_arr[$uid]['display_end'])) $event_end = > strtotime ($this_time_arr[$uid]['display_end']); > $event_start = date ($timeFormat, $event_start); > $event_end = date ($timeFormat, $event_end); > - $event_calno = > $this_time_arr[($event_length[$i]['key'])]['calnumber']; > - $event_recur = > $this_time_arr[($event_length[$i]['key'])]['recur']; > - $event_status = > strtolower($this_time_arr[($event_length[$i]['key'])]['status']); > + $event_calno = $this_time_arr[$uid]['calnumber']; > + $event_recur = $this_time_arr[$uid]['recur']; > + $event_status = strtolower($this_time_arr[$uid]['status']); > if ($event_calno > $unique_colors) $event_calno = > ($event_calno - $unique_colors); > if ($event_status != '') { > $confirmed = '<img src="images/'.$event_status.'.gif" > width="9" height="9" alt="" border="0" hspace="0" vspace="0" > /> '; > @@ -661,14 +651,12 @@ > > // Start drawing the event > $event_temp = $loop_event; > - $event_calna = > $this_time_arr[($event_length[$i]['key'])]['calname']; > - $event_url = > $this_time_arr[($event_length[$i]['key'])]['url']; > - $event = openevent($event_calna, $event_start, > $event_end, $this_time_arr[($event_length[$i]['key'])], '', 0, '', '', > 'ps', $event_url); > - $event_temp = str_replace('{EVENT}', $event, $event_temp); > - $event_temp = str_replace('{EVENT_START}', $event_start, > $event_temp); > - $event_temp = str_replace('{EVENT_END}', $event_end, > $event_temp); > - $event_temp = str_replace('{CONFIRMED}', $confirmed, > $event_temp); > - $event_temp = str_replace('{EVENT_CALNO}', $event_calno, > $event_temp); > + $event = openevent($getdate, $uid, $this_time_arr[$uid], > 0, 0, 'ps'); > + $event_temp = str_replace('{EVENT}', $event, $event_temp); > + $event_temp = str_replace('{EVENT_START}', $event_start, > $event_temp); > + $event_temp = str_replace('{EVENT_END}', $event_end, > $event_temp); > + $event_temp = str_replace('{CONFIRMED}', $confirmed, > $event_temp); > + $event_temp = str_replace('{EVENT_CALNO}', $event_calno, > $event_temp); > $daydisplay .= $event_temp; > $daydisplay .= '</td>'; > // End event drawing > @@ -711,40 +699,34 @@ > $loop_t_e = trim($match2[1]); > $return_adtmp = ''; > $return_etmp = ''; > - > + > if (is_array($master_array[$next_day]) && > sizeof($master_array[$next_day]) > 0) { > foreach ($master_array[$next_day] as $event_times) { > - foreach ($event_times as $val) { > + foreach ($event_times as $uid => $val) { > $event_text = stripslashes(urldecode($val["event_text"])); > $event_text = strip_tags($event_text, '<b><i><u>'); > - if ($event_text != "") { > - $event_calna = $val["calname"]; > - $event_url = $val["url"]; > - $event_start = date ($timeFormat, $val["start_unixtime"]); > - $event_end = date ($timeFormat, $val["end_unixtime"]); > - if (!isset($val["event_start"])) { > - $event_start = $lang['l_all_day']; > - $event_end = ''; > - $return_adtmp = openevent($event_calna, $event_start, > $event_end, $val, $tomorrows_events_lines, 21, '', '', 'psf', > $event_url); > - $replace_ad .= str_replace('{T_ALLDAY}', $return_adtmp, > $loop_t_ad); > - } else { > - $return_etmp = openevent($event_calna, $event_start, > $event_end, $val, $tomorrows_events_lines, 21, '', '', 'ps3', > $event_url); > - $replace_e .= str_replace('{T_EVENT}', $return_etmp, > $loop_t_e); > + if ($event_text != "") { > + if (!isset($val["event_start"])) { > + $return_adtmp = openevent($next_day, $uid, $val, > $tomorrows_events_lines, 21, 'psf'); > + $replace_ad .= str_replace('{T_ALLDAY}', $return_adtmp, > $loop_t_ad); > + } else { > + $return_etmp = openevent($next_day, $uid, $val, > $tomorrows_events_lines, 21, 'ps3'); > + $replace_e .= str_replace('{T_EVENT}', $return_etmp, > $loop_t_e); > } > } > } > } > - > + > $this->page = preg_replace('!<\!-- switch t_allday on -->(.*)<\!-- > switch t_allday off -->!is', $replace_ad, $this->page); > $this->page = preg_replace('!<\!-- switch t_event on -->(.*)<\!-- > switch t_event off -->!is', $replace_e, $this->page); > - > + > } else { > - > + > $this->page = preg_replace('!<\!-- switch tomorrows_events on > -->(.*)<\!-- switch tomorrows_events off -->!is', '', $this->page); > - > + > } > } > - > + > function get_vtodo() { > global $template, $getdate, $master_array, $next_day, $timeFormat, > $tomorrows_events_lines, $show_completed, $show_todos; > > @@ -891,28 +873,22 @@ > if ($master_array[$daylink]) { > if ($type != 'small') { > foreach ($master_array[$daylink] as $event_times) { > - foreach ($event_times as $val) { > + foreach ($event_times as $uid => $val) { > $event_calno = $val['calnumber']; > if ($event_calno > $unique_colors) $event_calno = > ($event_calno - $unique_colors); > - $event_calna = $val['calname']; > - $event_url = $val['url']; > if (!isset($val['event_start'])) { > if ($type == 'large') { > $switch['ALLDAY'] .= '<div class="V10"><img > src="templates/'.$template.'/images/monthdot_'.$event_calno.'.gif" > alt="" width="9" height="9" border="0" />'; > - $switch['ALLDAY'] .= openevent($event_calna, '', '', $val, > $month_event_lines, 15, '', '', 'psf', $event_url); > + $switch['ALLDAY'] .= openevent($daylink, $uid, $val, > $month_event_lines, 15, 'psf'); > $switch['ALLDAY'] .= '</div>'; > } else { > $switch['ALLDAY'] .= '<img > src="templates/'.$template.'/images/allday_dot.gif" alt=" " width="11" > height="10" border="0" />'; > } > } else { > - $event_start = $val['start_unixtime']; > - $event_end = (isset($val['display_end'])) ? > $val['display_end'] : $val["event_end"]; > - $event_start = date($timeFormat, $val['start_unixtime']); > $start2 = date($timeFormat_small, $val['start_unixtime']); > - $event_end = date($timeFormat, @strtotime ($event_end)); > if ($type == 'large') { > $switch['EVENT'] .= '<div class="V9"><img > src="templates/'.$template.'/images/monthdot_'.$event_calno.'.gif" > alt="" width="9" height="9" border="0" />'; > - $switch['EVENT'] .= openevent($event_calna, $event_start, > $event_end, $val, $month_event_lines, 10, "$start2 ", '', 'ps3', > $event_url).'<br />'; > + $switch['EVENT'] .= openevent($daylink, $uid, $val, > $month_event_lines, 10, 'ps3', "$start2 ").'<br />'; > $switch['EVENT'] .= '</div>'; > } else { > $switch['EVENT'] = '<img > src="templates/'.$template.'/images/event_dot.gif" alt=" " width="11" > height="10" border="0" />'; > @@ -971,22 +947,22 @@ > foreach ($master_array[$m_start] as $event_times) { > $switch['CAL'] = $cal; > $switch['START_DATE'] = localizeDate ($dateFormat_week_list, > $u_start); > - foreach ($event_times as $val) { > + foreach ($event_times as $uid => $val) { > $switch['CALNAME'] = $val['calname']; > - $switch['URL'] = $val['url']; > if (!isset($val['event_start'])) { > $switch['START_TIME'] = $lang['l_all_day']; > + $switch['EVENT_TEXT'] = openevent($m_start, $uid, $val, > $month_event_lines, 15, 'psf'); > $switch['DESCRIPTION'] = urldecode($val['description']); > - $switch['EVENT_TEXT'] = openevent($switch['CALNAME'], '', '', > $val, $month_event_lines, 15, '', '', 'psf', $switch['URL']); > - } else { > + } else { > $event_start = $val['start_unixtime']; > $event_end = (isset($val['display_end'])) ? > $val['display_end'] : $val["event_end"]; > $event_start = date($timeFormat, $val['start_unixtime']); > $event_end = date($timeFormat, @strtotime ($event_end)); > $switch['START_TIME'] = $event_start . ' - ' . $event_end; > - $switch['EVENT_TEXT'] = openevent($switch['CALNAME'], > $event_start, $event_end, $val, 0, 15, '', '', 'psf', $switch['URL']); > + $switch['EVENT_TEXT'] = openevent($m_start, $uid, $val, 0, > 15, 'psf'); > $switch['DESCRIPTION'] = urldecode($val['description']); > } > + > if ($switch['EVENT_TEXT'] != '') { > $switch['DAYLINK'] = $m_start; > $temp = $loop[$i]; > @@ -1004,11 +980,11 @@ > $check_month = date('m', $u_start); > unset ($switch); > } while ($this_month == $check_month); > - > + > $this->page = preg_replace('!<\!-- loop showbottomevents_odd on > -->(.*)<\!-- loop showbottomevents_even off -->!is', $middle, > $this->page); > - > + > } > - > + > function Page($template = 'std.tpl') { > if (file_exists($template)) > $this->page = join('', file($template)); > Index: includes/event.php > =================================================================== > RCS file: /cvsroot/phpicalendar/phpicalendar/includes/event.php,v > retrieving revision 1.30 > diff -u -r1.30 event.php > --- includes/event.php 2 Sep 2004 18:41:13 -0000 1.30 > +++ includes/event.php 5 May 2005 19:48:54 -0000 > @@ -1,6 +1,8 @@ > <?php > define('BASE', '../'); > +$getdate = $_POST['date']; > include_once(BASE.'functions/init.inc.php'); > +include_once(BASE.'functions/ical_parser.php'); > require_once(BASE.'functions/template.php'); > > function decode_popup ($item) { > @@ -9,29 +11,20 @@ > return $item; > } > > -$event = (isset($_POST['event'])) ? decode_popup($_POST['event']) : > (''); > -$description = (isset($_POST['description'])) ? > decode_popup($_POST['description']) : (''); > -$cal = (isset($_POST['cal'])) ? decode_popup($_POST['cal']) : (''); > -$start = (isset($_POST['start'])) ? decode_popup($_POST['start']) : > (''); > -$end = (isset($_POST['end'])) ? decode_popup($_POST['end']) : (''); > -$status = (isset($_POST['status'])) ? > decode_popup($_POST['status']) : (''); > -$location = (isset($_POST['location'])) ? > decode_popup($_POST['location']) : (''); > -$url = (isset($_POST['url'])) ? decode_popup($_POST['url']) : (''); > -$organizer = (isset($_POST['organizer'])) ? ($_POST['organizer']) : > (''); > -$organizer = unserialize (decode_popup ($organizer)); > -$attendee = (isset($_POST['attendee'])) ? ($_POST['attendee']) : > (''); > -$attendee = unserialize (decode_popup ($attendee)); > -$cal_title_full = $cal.' '.$calendar_lang; > +$event = > $master_array[$_POST['date']][$_POST['time']][decode_popup($_POST['uid' > ])]; > +$organizer = unserialize($event['organizer']); > +$attendee = unserialize($event['attendee']); > > // Format event time > -if (($start) && ($end)) { > - $event_times = $start . ' - ' . $end; > -} > -if ($start == '' && $end == '' && (isset($start) && isset($end))) { > +// All day > +if ($_POST['time'] == -1) { > $event_times = $lang['l_all_day']; > +} else { > + $event_times = date($timeFormat, $event['start_unixtime']) . ' - ' . > date($timeFormat, $event['end_unixtime']); > } > > -if ($description) $description = > ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a > target="_new" href="\0">\0</a>',$description); > +if ($event['description']) $event['description'] = > ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a > target="_new" href="\0">\0</a>',$event['description']); > + > if (is_array($organizer)) { > $i=0; > $display .= $organizer_lang . ' - '; > @@ -51,8 +44,8 @@ > $attendee = substr($attendees,0,-2); > } > > -if ($location) { > - if ($url != '') $location = '<a href="'.$url.'" > target="_blank">'.$location.'</a>'; > +if ($event['location']) { > + if ($event['url'] != '') $event['location'] = '<a > href="'.$event['url'].'" target="_blank">'.$event['location'].'</a>'; > } > > if (sizeof($attendee) == 0) $attendee = ''; > @@ -61,15 +54,15 @@ > $page = new Page(BASE.'templates/'.$template.'/event.tpl'); > > $page->replace_tags(array( > - 'cal' => $cal, > - 'event' => $event, > + 'cal' => $event['calname'], > + 'event_text' => urldecode($event['event_text']), > 'event_times' => $event_times, > - 'description' => $description, > + 'description' => $event['description'], > 'organizer' => $organizer, > 'attendee' => $attendee, > - 'status' => $status, > - 'location' => $location, > - 'cal_title_full' => $cal_title_full, > + 'status' => $event['status'], > + 'location' => $event['location'], > + 'cal_title_full' => $event['calname'].' '.$lang['l_calendar'], > 'template' => $template, > 'l_organizer' => $lang['l_organizer'], > 'l_attendee' => $lang['l_attendee'], > Index: templates/default/event.tpl > =================================================================== > RCS file: > /cvsroot/phpicalendar/phpicalendar/templates/default/event.tpl,v > retrieving revision 1.8 > diff -u -r1.8 event.tpl > --- templates/default/event.tpl 31 Oct 2004 19:50:15 -0000 1.8 > +++ templates/default/event.tpl 5 May 2005 19:48:54 -0000 > @@ -15,7 +15,7 @@ > <tr> > <td align="left" class="V12"> > <div style="margin-left: 10px; margin-bottom:10px;"> > - <p>{EVENT} - <span class="V9">(<i>{EVENT_TIMES}</i>)</span></p> > + <p>{EVENT_TEXT} - <span > class="V9">(<i>{EVENT_TIMES}</i>)</span></p> > <!-- switch description on --> > <p>{DESCRIPTION}</p> > <!-- switch description off --> > Index: templates/default/header.tpl > =================================================================== > RCS file: > /cvsroot/phpicalendar/phpicalendar/templates/default/header.tpl,v > retrieving revision 1.10 > diff -u -r1.10 header.tpl > --- templates/default/header.tpl 12 Aug 2004 20:32:50 -0000 1.10 > +++ templates/default/header.tpl 5 May 2005 19:48:54 -0000 > @@ -12,14 +12,7 @@ > </head> > <body> > <form name="eventPopupForm" id="eventPopupForm" method="post" > action="includes/event.php" style="display: none;"> > - <input type="hidden" name="event" id="event" value="" /> > - <input type="hidden" name="cal" id="cal" value="" /> > - <input type="hidden" name="start" id="start" value="" /> > - <input type="hidden" name="end" id="end" value="" /> > - <input type="hidden" name="description" id="description" value="" /> > - <input type="hidden" name="status" id="status" value="" /> > - <input type="hidden" name="location" id="location" value="" /> > - <input type="hidden" name="organizer" id="organizer" value="" /> > - <input type="hidden" name="attendee" id="attendee" value="" /> > - <input type="hidden" name="url" id="url" value="" /> > -</form> > \ No newline at end of file > + <input type="hidden" name="date" id="date" value="" /> > + <input type="hidden" name="time" id="time" value="" /> > + <input type="hidden" name="uid" id="uid" value="" /> > +</form> > > --------------020305090307080109000700-- > > > > --__--__-- > > _______________________________________________ > Phpicalendar-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel > > > End of Phpicalendar-devel Digest |
From: David F. <da...@d2...> - 2005-05-05 19:54:15
|
Attached is a borderline-2.0 worthy cleanup of openevent/event.php. It simplifies the function by changing the data-passing to use the date/time/uid to then lookup the event info in $master_array in event.php, instead of passing the raw data. It's possibly a precursor to even more cleanup of that whole process, by turning the popups into simple links instead of using the hidden form to pass data around. Note this assumes that the UIDs are unique across calendars, which seems to be a valid assumption given how $master_array is structured (if it's a bogus assumption, then events with the same $uid are going to be overwriting each other anyways). If this is valid, I should also clean up how todo.php works (amusingly, in a totally different fashion, using a base64-encoded get string. lends more validity to "the right way" being removing the hidden form stuff completely, but it's a big enough structure change I want to make sure there wasn't some other valid reason I just don't know about for doing it). This patch also fixes an actual bug - the event.php popup should have had the title be "$calname $lang['l_calendar']" - i.e., "US Holidays Calendar" - it was using the old translation syntax, and thus was just showing up as "US Holidays". Actually, this is probably worth going into 2.0, as I realized it's a decently-smaller HTML render, as now all the event info isn't included in the page for every event (twice). called openevent.patch look, diffstat says it's good! :) davef@rake-l:phpicalendar-working 539 > diffstat openevent.patch functions/date_functions.php | 38 ++++------- functions/draw_functions.php | 2 functions/event.js | 30 ++------ functions/ical_parser.php | 14 ++-- functions/template.php | 148 ++++++++++++++++++------------------------- includes/event.php | 45 +++++-------- templates/default/event.tpl | 2 templates/default/header.tpl | 15 +--- 8 files changed, 118 insertions(+), 176 deletions(-) I'm also working on a post-2.0 enhancement that adds human-readable recurrence info to event.php. Cool feature, needs a decent amount more work to support all the various ways recurrence info could exist. I stuck the function that does this in ical_parser.php, which probably isn't right. Please let me know if you'd like to see the work-in-progress. dave |
From: Chad L. <ch...@ch...> - 2005-05-05 19:02:49
|
Hello, We've added David Fallon to the list of developers. I'd like to thank him (and Jim) for their efforts in continuing the project during my waves of interest. I will be putting the site back up later this month, which I think many will be thankful for. PHP ICalendar was one of the first things I wrote while learning PHP, and it's age is starting to show. I've overhauled a good bit of the template, html, and css for 2.0, but its not perfect. I'd love it if we could focus on getting in the already provided patches in sourceforge, as well as looking at a few of the bugs that are there. We'd then be able to get out a new release to go up with the new site. Once we get the next release out I think that would be the best time to look at serious restructuring of ical_parser and moving it to a class, with DB support. -chad |
From: David F. <da...@d2...> - 2005-05-05 18:39:20
|
I found a redundant translation message - l_status was listed twice. Fixed that, and also cleaned up the german translation which didn't have valid <CR>s. dave |
From: David F. <da...@d2...> - 2005-05-05 18:21:35
|
I noticed this while messing with something else - the CSS file has a non-defined element. The attached one-liner fixes it, makes the css validator sign off on things. dave |
From: David F. <da...@d2...> - 2005-05-05 17:43:54
|
Hmm, that's odd. I just tried this out, and it seems to render properly. I have both an allday event spanning multiple days, and an event that went from 10am thursday to 11am sunday. Both seemed to display fine - the only "weirdness" was on the day view on friday/sat, the times listed for the event were 12:am -> 11am (not the actual start, just the start in the day). That's semi-bogus, but I'm not sure what the 'intent' there is. If that is a bug, let me know and I'll fix it. It'd also be nice if it listed the date for events that ran into other days, so you knew just how long it is, but that's how it's worked. Can you post a calendar and explain in more detail, so I can fix it? dave Jamin W. Collins wrote: > On Thu, May 05, 2005 at 02:13:38AM -0500, Jim Hu wrote: > >>David Fallon noticed a bug in the template.php I uploaded last night. >>An all-day event suppresses display of later events that start before >>$cal_time. It turns out that this was a problem in earlier versions of >>template.php as well. I've uploaded his solution to CVS as version >>1.68...I had previously uploaded a kludge as 1.67. This also makes the >>$keys to $this_time_arr consistent between events copied from the >>master array directly and prepended events that start before $cal_time. > > > Not sure if this should also have corrected the display of events that > span days, but the current CVS is also not displaying items of this > nature properly. With the current CVS, events that span multiple days > only appear to be displayed on the day they start. > |
From: Jamin W. C. <jco...@as...> - 2005-05-05 14:54:04
|
On Thu, May 05, 2005 at 02:13:38AM -0500, Jim Hu wrote: > David Fallon noticed a bug in the template.php I uploaded last night. > An all-day event suppresses display of later events that start before > $cal_time. It turns out that this was a problem in earlier versions of > template.php as well. I've uploaded his solution to CVS as version > 1.68...I had previously uploaded a kludge as 1.67. This also makes the > $keys to $this_time_arr consistent between events copied from the > master array directly and prepended events that start before $cal_time. Not sure if this should also have corrected the display of events that span days, but the current CVS is also not displaying items of this nature properly. With the current CVS, events that span multiple days only appear to be displayed on the day they start. -- 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 |
From: Jim Hu <ji...@ta...> - 2005-05-05 07:13:59
|
David Fallon noticed a bug in the template.php I uploaded last night. An all-day event suppresses display of later events that start before $cal_time. It turns out that this was a problem in earlier versions of template.php as well. I've uploaded his solution to CVS as version 1.68...I had previously uploaded a kludge as 1.67. This also makes the $keys to $this_time_arr consistent between events copied from the master array directly and prepended events that start before $cal_time. See it in action at: http://dimer.tamu.edu/phpicalendar-2.0a/week.php? cal=all_calendars_combined971&getdate=20050504 Try setting the starting times to different times. Jim Hu |
From: David F. <da...@d2...> - 2005-05-04 17:28:03
|
ah, really? How interesting, I didn't know sunbird would download the calendar before editing. How does it handle conflicts? I'll have to relook at it. Jamin W. Collins wrote: > On Tue, May 03, 2005 at 05:45:51PM -0700, David Fallon wrote: > >>Because then I have to worry about sync'ing issues - the only way that >>works is if I say only a particular user gets to update a given >>calendar, and that sucks. > > > Not so. I have several calendars that are stored on a WebDAV server > (actually a Subversion autoversioning repository) and Sunbird will allow > for multi-user authoring without a hitch. It grabs the current version > of the calendar before each commit thereby keeping changes made by other > users. > > >>Plus, the UI for phpicalendar rocks, and it's cross platform (I have >>to worry about windows, linux, and mac clients). > > > Sunbird is cross-platform also. > > Just an idea. > |
From: David F. <da...@d2...> - 2005-05-04 17:25:52
|
it doesn't add new copies of the event (my current limited understanding is the master_array "renders" out the original event regardless of when it is, and then whatever events are around the date range you're looking at). All I'm doing is adding the $recur data to every copy of the event, whereas before it was just in the original event (making it impossible to look up the info unless you were looking at the original event). So, it really depends on how many recurring events you've got, in terms of what absolute amount of size it adds to master_array. While I'm on the subject, you theoretically could drop $master_array a lot, by separating it out into two arrays - one $event_array that held all the events indexed by calendar/uid, and $master array that held the rendered-out events indexed by date/time as usual, but instead of holding the full event data, they'd just hold a "pointer", if you will, of the calendar/uid, so you could lookup the actual data in $event_array. Dunno about the specifics, but It'd vastly compress any recurring event info, which is where your space really grows since each recurring event that's "rendered" into master_array holds the full event text, organizers, attendees, etc. etc. It'd be even better/easier if you can assume $uid is unique across calendars, which (if it isn't already a safe assumption), you could have ical_parser guarantee as you were building the arrays. :) Not something I'm quite ready to tackle yet, but food for thought. dave Jim Hu wrote: > I think we need Chad to weigh in before changing how the master array > handles repeating events...what happens to the size of the array if the > event is set to repeat forever? > > Jim Hu > > On May 3, 2005, at 7:47 PM, > php...@li... wrote: > <snip> > >> Message: 2 >> Date: Tue, 03 May 2005 16:29:54 -0700 >> From: David Fallon <da...@d2...> >> To: php...@li... >> CC: ji...@ta... >> Subject: Re: [PHPiCalendar-DEV] code cleanup patch - more fixes >> Reply-To: php...@li... >> >> This is a multi-part message in MIME format. >> --------------080707090207070601060108 >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> Content-Transfer-Encoding: 7bit >> >> So, this is worth applying, but only if you don't apply my forthcoming >> patch - I'll shortly (maybe later today) have a reworked >> openevent/event.php setup that uses date+time+uid to lookup the event, >> instead of passing the data to the page. This leads to a few questions: >> >> 1. is this acceptable? I'm kinda running wild here since no one's saying >> anything, but obviously I'd like to run wild in the right direction. >> >> 2. if the patch goes in, it's significantly less data to pass through - >> which means we could remove the "changing the hidden form" hackery? If >> so, let me know, I'll put together a patch. >> >> 3. I noticed a two issues with the generation of master_array - first, >> the recur data wasn't being replicated to each instance of the event, >> only the first event - so (without iterating through the whole array) >> there was no good way to get it. So, I fixed that. This raises the size >> of master_array by a decent amount, so it's questionable, but necessary >> for me to implement recur details in the event popup. Second, all-day >> recurring events after the first one weren't getting set with valid uids >> - they were being added to the allday time w/ the "next" array key, >> instead of using the uid. This is less questionable, and a one-line fix >> - both fixes are in the patch, but if you want to cherry pick and would >> prefer this fix alone, let me know. >> >> So everyone knows, my immediate goals are: >> >> * adding recur info to the event.php popup, so it's more useful, and so >> I learn enough to do: >> >> * add basic event adding/editing. This obviously assumes that the >> phpicalendar "owns" the calendar, and thus will ignore locking/sync'ing >> beyond making sure it doesn't overwrite itself. This will be entirely >> optional (I'm happy to make it some sort of config option people have to >> turn on in general or per-calendar). >> >> * And then probably add a basic level of user support, so users can have >> their own calendars vs. shared calendars, etc. Simplistic calendar >> server. >> >> As always, I'd much prefer to do this the "right" way, in that >> maintaining a patch set against CVS sucks long term - so if there are >> way you'd prefer this done, please let me know and spare me the time >> reworking things later. phpicalendar has a *@(#ing awesome interface, by >> far the best I've seen so far, and the last piece I need to solve a few >> problems for me is the editing. >> >> (cc'd jim so you get the patch) >> >> dave >> <snip> > > > > > ------------------------------------------------------- > 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 > |
From: Jim Hu <ji...@ta...> - 2005-05-04 05:57:06
|
I just uploaded a new version of template.php to the CVS: This includes the changes to draw_search that I was having trouble uploading a while ago, and also solves the problem with event display noted by David Fallon. I ended up using a different solution than David did - I think this is simpler, and it handles some problems I had with his patch. unset($this_time_arr); if ($day_start == $cal_time && isset($master_array[$thisday]) && is_array($master_array[$thisday])) { 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; } } } else { break; } } }else{ if (isset($master_array[$thisday][$cal_time]) && sizeof($master_array[$thisday][$cal_time]) > 0) { $this_time_arr = $master_array[$thisday][$cal_time]; } } the key changes are to 1 )flip the order of looking for early events and events that start after the default start time 2) include the ones that match the default start time in the former 3) do the latter only if $cal_time != $day_start. see: http://dimer.tamu.edu/phpicalendar-2.0a/week.php? cal=all_calendars_combined971&getdate=20050504 for working version with test calendars. |
From: Jamin W. C. <jco...@as...> - 2005-05-04 03:47:57
|
On Tue, May 03, 2005 at 05:45:51PM -0700, David Fallon wrote: > Because then I have to worry about sync'ing issues - the only way that > works is if I say only a particular user gets to update a given > calendar, and that sucks. Not so. I have several calendars that are stored on a WebDAV server (actually a Subversion autoversioning repository) and Sunbird will allow for multi-user authoring without a hitch. It grabs the current version of the calendar before each commit thereby keeping changes made by other users. > Plus, the UI for phpicalendar rocks, and it's cross platform (I have > to worry about windows, linux, and mac clients). Sunbird is cross-platform also. Just an idea. -- Jamin W. Collins Facts do not cease to exist because they are ignored. --Aldous Huxley, "Proper Studies", 1927 |
From: Jim Hu <ji...@ta...> - 2005-05-04 02:09:38
|
I think we need Chad to weigh in before changing how the master array handles repeating events...what happens to the size of the array if the event is set to repeat forever? Jim Hu On May 3, 2005, at 7:47 PM, php...@li... wrote: <snip> > Message: 2 > Date: Tue, 03 May 2005 16:29:54 -0700 > From: David Fallon <da...@d2...> > To: php...@li... > CC: ji...@ta... > Subject: Re: [PHPiCalendar-DEV] code cleanup patch - more fixes > Reply-To: php...@li... > > This is a multi-part message in MIME format. > --------------080707090207070601060108 > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > Content-Transfer-Encoding: 7bit > > So, this is worth applying, but only if you don't apply my forthcoming > patch - I'll shortly (maybe later today) have a reworked > openevent/event.php setup that uses date+time+uid to lookup the event, > instead of passing the data to the page. This leads to a few questions: > > 1. is this acceptable? I'm kinda running wild here since no one's > saying > anything, but obviously I'd like to run wild in the right direction. > > 2. if the patch goes in, it's significantly less data to pass through - > which means we could remove the "changing the hidden form" hackery? If > so, let me know, I'll put together a patch. > > 3. I noticed a two issues with the generation of master_array - first, > the recur data wasn't being replicated to each instance of the event, > only the first event - so (without iterating through the whole array) > there was no good way to get it. So, I fixed that. This raises the size > of master_array by a decent amount, so it's questionable, but necessary > for me to implement recur details in the event popup. Second, all-day > recurring events after the first one weren't getting set with valid > uids > - they were being added to the allday time w/ the "next" array key, > instead of using the uid. This is less questionable, and a one-line fix > - both fixes are in the patch, but if you want to cherry pick and would > prefer this fix alone, let me know. > > So everyone knows, my immediate goals are: > > * adding recur info to the event.php popup, so it's more useful, and so > I learn enough to do: > > * add basic event adding/editing. This obviously assumes that the > phpicalendar "owns" the calendar, and thus will ignore locking/sync'ing > beyond making sure it doesn't overwrite itself. This will be entirely > optional (I'm happy to make it some sort of config option people have > to > turn on in general or per-calendar). > > * And then probably add a basic level of user support, so users can > have > their own calendars vs. shared calendars, etc. Simplistic calendar > server. > > As always, I'd much prefer to do this the "right" way, in that > maintaining a patch set against CVS sucks long term - so if there are > way you'd prefer this done, please let me know and spare me the time > reworking things later. phpicalendar has a *@(#ing awesome interface, > by > far the best I've seen so far, and the last piece I need to solve a few > problems for me is the editing. > > (cc'd jim so you get the patch) > > dave > <snip> |
From: David F. <da...@d2...> - 2005-05-04 00:46:00
|
Because then I have to worry about sync'ing issues - the only way that works is if I say only a particular user gets to update a given calendar, and that sucks. If it's on the server, then as long as I have phpicalendar deal with the locking (which is relatively trivial if I assume all the editing will occur through it), I can let anyone edit any calendar (as appropriate per their permissions, etc.) Plus, the UI for phpicalendar rocks, and it's cross platform (I have to worry about windows, linux, and mac clients). dave Jamin W. Collins wrote: > On Tue, May 03, 2005 at 04:29:54PM -0700, David Fallon wrote: > >>and the last piece I need to solve a few problems for me is the >>editing. > > > Why not use an application such as Sunbird for the editing? Just > curious. > > |
From: Jamin W. C. <jco...@as...> - 2005-05-03 23:51:22
|
On Tue, May 03, 2005 at 04:29:54PM -0700, David Fallon wrote: > > and the last piece I need to solve a few problems for me is the > editing. Why not use an application such as Sunbird for the editing? Just curious. -- Jamin W. Collins "Never underestimate the power of very stupid people in large groups." -- John Kenneth Galbraith |
From: David F. <da...@d2...> - 2005-05-03 23:30:07
|
So, this is worth applying, but only if you don't apply my forthcoming patch - I'll shortly (maybe later today) have a reworked openevent/event.php setup that uses date+time+uid to lookup the event, instead of passing the data to the page. This leads to a few questions: 1. is this acceptable? I'm kinda running wild here since no one's saying anything, but obviously I'd like to run wild in the right direction. 2. if the patch goes in, it's significantly less data to pass through - which means we could remove the "changing the hidden form" hackery? If so, let me know, I'll put together a patch. 3. I noticed a two issues with the generation of master_array - first, the recur data wasn't being replicated to each instance of the event, only the first event - so (without iterating through the whole array) there was no good way to get it. So, I fixed that. This raises the size of master_array by a decent amount, so it's questionable, but necessary for me to implement recur details in the event popup. Second, all-day recurring events after the first one weren't getting set with valid uids - they were being added to the allday time w/ the "next" array key, instead of using the uid. This is less questionable, and a one-line fix - both fixes are in the patch, but if you want to cherry pick and would prefer this fix alone, let me know. So everyone knows, my immediate goals are: * adding recur info to the event.php popup, so it's more useful, and so I learn enough to do: * add basic event adding/editing. This obviously assumes that the phpicalendar "owns" the calendar, and thus will ignore locking/sync'ing beyond making sure it doesn't overwrite itself. This will be entirely optional (I'm happy to make it some sort of config option people have to turn on in general or per-calendar). * And then probably add a basic level of user support, so users can have their own calendars vs. shared calendars, etc. Simplistic calendar server. As always, I'd much prefer to do this the "right" way, in that maintaining a patch set against CVS sucks long term - so if there are way you'd prefer this done, please let me know and spare me the time reworking things later. phpicalendar has a *@(#ing awesome interface, by far the best I've seen so far, and the last piece I need to solve a few problems for me is the editing. (cc'd jim so you get the patch) dave David Fallon wrote: > while poking into the event stuff, I found there's a decent amount of > redundancy, specifically in the $url passing to openevent() - it's in > the $arr variable, and it's also then seperated out into it's own > argument (but the function ignores that, and uses the value from $arr if > it's there) - I went through all the calls to openevent, and cleaned it > up. Patch attached, decently tested - I didn't actually verify it's > being correctly passed for every value, but it's a pretty simple patch. > Against latest cvs, etc. etc. > > dave > > > ------------------------------------------------------------------------ > > Index: functions/date_functions.php > =================================================================== > RCS file: /cvsroot/phpicalendar/phpicalendar/functions/date_functions.php,v > retrieving revision 1.26 > diff -u -r1.26 date_functions.php > --- functions/date_functions.php 26 Oct 2004 19:12:29 -0000 1.26 > +++ functions/date_functions.php 3 May 2005 18:19:12 -0000 > @@ -162,7 +162,7 @@ > return $offset; > } > > -function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text, $post_text, $link_class, $url) { > +function openevent($calendar_name, $start, $end, $arr, $lines, $wrap, $pre_text, $post_text, $link_class) { > $event_text = stripslashes(urldecode($arr["event_text"])); > if (empty($start)) { > $title = $event_text; > 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 18:19:12 -0000 > @@ -254,9 +254,8 @@ > foreach ($master_array[$get_date]['-1'] as $allday) { > $event_calno = $allday['calnumber']; > $event_calna = $allday['calname']; > - $event_url = $allday['url']; > if ($event_calno > $unique_colors) $event_calno = ($event_calno - $unique_colors); > - $event = openevent($event_calna, '', '', $allday, 1, 11, '', '', 'psf', $event_url); > + $event = openevent($event_calna, '', '', $allday, 1, 11, '', '', 'psf'); > $loop_tmp = str_replace('{ALLDAY}', $event, $loop_ad); > $loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp); > $replace .= $loop_tmp; > @@ -410,7 +409,6 @@ > $event_start = date ($timeFormat_small, $event_start); > $event_calno = $this_time_arr[($event_length[$thisday][$i]['key'])]['calnumber']; > $event_calna = $this_time_arr[($event_length[$thisday][$i]['key'])]['calname']; > - $event_url = $this_time_arr[($event_length[$thisday][$i]['key'])]['url']; > $event_status = strtolower($this_time_arr[($event_length[$thisday][$i]['key'])]['status']); > if ($event_calno > $unique_colors) $event_calno = ($event_calno - $unique_colors); > if ($event_status != '') { > @@ -425,7 +423,7 @@ > > // Start drawing the event > $event_temp = $loop_event; > - $event = openevent($event_calna, $event_start, $event_end, $this_time_arr[($event_length[$thisday][$i]["key"])], $week_events_lines, 25, '', '', 'ps', $event_url); > + $event = openevent($event_calna, $event_start, $event_end, $this_time_arr[($event_length[$thisday][$i]["key"])], $week_events_lines, 25, '', '', 'ps'); > $event_temp = str_replace('{EVENT}', $event, $event_temp); > $event_temp = str_replace('{EVENT_START}', $event_start, $event_temp); > $event_temp = str_replace('{CONFIRMED}', $confirmed, $event_temp); > @@ -476,9 +474,8 @@ > foreach ($master_array[$getdate]['-1'] as $allday) { > $event_calno = $allday['calnumber']; > $event_calna = $allday['calname']; > - $event_url = $allday['url']; > if ($event_calno > $unique_colors) $event_calno = ($event_calno - $unique_colors); > - $event = openevent($event_calna, '', '', $allday, 0, '', '', '', '', $event_url); > + $event = openevent($event_calna, '', '', $allday, 0, '', '', '', ''); > $loop_tmp = str_replace('{ALLDAY}', $event, $loop_ad); > $loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp); > $replace .= $loop_tmp; > @@ -636,8 +633,7 @@ > // Start drawing the event > $event_temp = $loop_event; > $event_calna = $this_time_arr[($event_length[$i]['key'])]['calname']; > - $event_url = $this_time_arr[($event_length[$i]['key'])]['url']; > - $event = openevent($event_calna, $event_start, $event_end, $this_time_arr[($event_length[$i]['key'])], '', 0, '', '', 'ps', $event_url); > + $event = openevent($event_calna, $event_start, $event_end, $this_time_arr[($event_length[$i]['key'])], '', 0, '', '', 'ps'); > $event_temp = str_replace('{EVENT}', $event, $event_temp); > $event_temp = str_replace('{EVENT_START}', $event_start, $event_temp); > $event_temp = str_replace('{EVENT_END}', $event_end, $event_temp); > @@ -693,16 +689,15 @@ > $event_text = strip_tags($event_text, '<b><i><u>'); > if ($event_text != "") { > $event_calna = $val["calname"]; > - $event_url = $val["url"]; > $event_start = date ($timeFormat, $val["start_unixtime"]); > $event_end = date ($timeFormat, $val["end_unixtime"]); > if (!isset($val["event_start"])) { > $event_start = $lang['l_all_day']; > $event_end = ''; > - $return_adtmp = openevent($event_calna, $event_start, $event_end, $val, $tomorrows_events_lines, 21, '', '', 'psf', $event_url); > + $return_adtmp = openevent($event_calna, $event_start, $event_end, $val, $tomorrows_events_lines, 21, '', '', 'psf'); > $replace_ad .= str_replace('{T_ALLDAY}', $return_adtmp, $loop_t_ad); > } else { > - $return_etmp = openevent($event_calna, $event_start, $event_end, $val, $tomorrows_events_lines, 21, '', '', 'ps3', $event_url); > + $return_etmp = openevent($event_calna, $event_start, $event_end, $val, $tomorrows_events_lines, 21, '', '', 'ps3'); > $replace_e .= str_replace('{T_EVENT}', $return_etmp, $loop_t_e); > } > } > @@ -869,11 +864,10 @@ > $event_calno = $val['calnumber']; > if ($event_calno > $unique_colors) $event_calno = ($event_calno - $unique_colors); > $event_calna = $val['calname']; > - $event_url = $val['url']; > if (!isset($val['event_start'])) { > if ($type == 'large') { > $switch['ALLDAY'] .= '<div class="V10"><img src="templates/'.$template.'/images/monthdot_'.$event_calno.'.gif" alt="" width="9" height="9" border="0" />'; > - $switch['ALLDAY'] .= openevent($event_calna, '', '', $val, $month_event_lines, 15, '', '', 'psf', $event_url); > + $switch['ALLDAY'] .= openevent($event_calna, '', '', $val, $month_event_lines, 15, '', '', 'psf'); > $switch['ALLDAY'] .= '</div>'; > } else { > $switch['ALLDAY'] .= '<img src="templates/'.$template.'/images/allday_dot.gif" alt=" " width="11" height="10" border="0" />'; > @@ -886,7 +880,7 @@ > $event_end = date($timeFormat, @strtotime ($event_end)); > if ($type == 'large') { > $switch['EVENT'] .= '<div class="V9"><img src="templates/'.$template.'/images/monthdot_'.$event_calno.'.gif" alt="" width="9" height="9" border="0" />'; > - $switch['EVENT'] .= openevent($event_calna, $event_start, $event_end, $val, $month_event_lines, 10, "$start2 ", '', 'ps3', $event_url).'<br />'; > + $switch['EVENT'] .= openevent($event_calna, $event_start, $event_end, $val, $month_event_lines, 10, "$start2 ", '', 'ps3').'<br />'; > $switch['EVENT'] .= '</div>'; > } else { > $switch['EVENT'] = '<img src="templates/'.$template.'/images/event_dot.gif" alt=" " width="11" height="10" border="0" />'; > @@ -947,18 +941,17 @@ > $switch['START_DATE'] = localizeDate ($dateFormat_week_list, $u_start); > foreach ($event_times as $val) { > $switch['CALNAME'] = $val['calname']; > - $switch['URL'] = $val['url']; > if (!isset($val['event_start'])) { > $switch['START_TIME'] = $lang['l_all_day']; > $switch['DESCRIPTION'] = urldecode($val['description']); > - $switch['EVENT_TEXT'] = openevent($switch['CALNAME'], '', '', $val, $month_event_lines, 15, '', '', 'psf', $switch['URL']); > + $switch['EVENT_TEXT'] = openevent($switch['CALNAME'], '', '', $val, $month_event_lines, 15, '', '', 'psf'); > } else { > $event_start = $val['start_unixtime']; > $event_end = (isset($val['display_end'])) ? $val['display_end'] : $val["event_end"]; > $event_start = date($timeFormat, $val['start_unixtime']); > $event_end = date($timeFormat, @strtotime ($event_end)); > $switch['START_TIME'] = $event_start . ' - ' . $event_end; > - $switch['EVENT_TEXT'] = openevent($switch['CALNAME'], $event_start, $event_end, $val, 0, 15, '', '', 'psf', $switch['URL']); > + $switch['EVENT_TEXT'] = openevent($switch['CALNAME'], $event_start, $event_end, $val, 0, 15, '', '', 'psf'); > $switch['DESCRIPTION'] = urldecode($val['description']); > } > if ($switch['EVENT_TEXT'] != '') { |
From: David F. <da...@d2...> - 2005-05-03 18:25:05
|
while poking into the event stuff, I found there's a decent amount of redundancy, specifically in the $url passing to openevent() - it's in the $arr variable, and it's also then seperated out into it's own argument (but the function ignores that, and uses the value from $arr if it's there) - I went through all the calls to openevent, and cleaned it up. Patch attached, decently tested - I didn't actually verify it's being correctly passed for every value, but it's a pretty simple patch. Against latest cvs, etc. etc. dave |
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 > |
From: Jim Hu <ji...@ta...> - 2005-05-03 04:59:06
|
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 |
From: David F. <da...@d2...> - 2005-05-03 02:06:04
|
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 |
From: David F. <da...@d2...> - 2005-05-03 00:35:35
|
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 |
From: Jamin W. C. <jco...@as...> - 2005-05-02 21:27:16
|
[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 |