Fri 27 May 2005 04:36:50 AM UTC, comment #1:
One thing that I did to get around this, which is of course a gross, insecure hack, but may be a decent starting-point for a real solution, is as follows:
1) remove the need for authentication from ical.php
2) hardcode (ewwww) a login and password for a real phpgw user, who would preferably have read-only access. I'm not sure how else to get database access, i.e. a $sessionid.
3) add a parameter to the URL, i.e. calendar/ical.php?vilhuber would refer to the calendar by vilhuber.
This allows ANYONE to view anybody else's calendar at present.
Obvious improvements are to have a setting in a user's profile (or relevant calendar) that allows viewing by the ical.php program. Also, one could use vilhuber.Home instead of just 'vilhuber' to refer to a calendar called 'Home' by user 'vilhuber'. Not sure if phpgroupware has such a concept, though I think multiple calendars are allowed. If so, each calendar should, of course, have a 'allow export' flag of some sort. Other variantions of the calendar-access naming are of course possible.
That still seems a bit of a hack, but one can always improve later.
|
Thu 26 May 2005 11:12:13 PM UTC, original submission:
A user should be able to publish his or her calendar to anyone. This sort of works via the calendar/ical.php, but this still requires a username password, and that username and password is used to look up the calendar. Which means that only I can 'subscribe' to the phpgroupware calendar, since only I (presumably) know my password.
Perhaps a better way to publish a calendar from within phpgroupware is to write out the calendar file in ics format to the directory set during setup time (I set mine to /var/lib/phpgroupware. This would be much easier on the database and user-logins than doing interactive dips into the database everytime someone calls ical.php.
Updates can be written either manually (through a 'Publish' button in the UI for example), or periodically, or automatically, whenever a change is made to the calendar.
Conversely, it would be great to be able to 'subscribe' to an external calendar. Currently, there's an import function, which seems to be able to read ical format, but this is an actual import. What is needed for subscribe functionality is to read the external calendar, then put the entries (perhaps) into a separate calendar, and make it read-only. Next time we update the subscription (manually via 'Refresh' or automatically every X minutes), all entries are flushed from this calendar, and the new ones read (again read-only).
For extra credit, what I REALLY want is to be able to edit the calendar both locally in phpgroupware and on the remote computer, and have both remain in sync. Alas, I don't think the iCalendar format is good for that sort of thing, or at least not eaily. SunBird (mozilla) does this , by reading the remote calendar, mofifying it, then writing it back out. If every program did this, that could work, but a) they don't and b) this seems wildly inefficient (but I'm no expert on syncing technology...).
|