[cvs] [Wiki] changed: KronolithCustomEvents
Jan Schneider
jan at horde.org
Sun Nov 29 23:34:28 UTC 2009
jan Sun, 29 Nov 2009 18:34:28 -0500
Modified page: http://wiki.horde.org/KronolithCustomEvents
New Revision: 1.1
Change log: Add title and fix horde category explanations
@@ -1,5 +1,5 @@
-> I want to show events from an external source in the Kronolith
calendar views. I don't want to do this by exporting the events to
iCal and then showing them as an external calendar. The events are
grouped in multiple calendars, the user should be able to
disable/enable these calendars.
++ How to show cutom event sources in Kronolith
([http://stackoverflow.com/questions/1808104/how-to-show-custom-events-to-a-kronolith-calendar Also posted on Stack
Overflow])
You can do this by implementing the {{listTimeObjects}} and
{{listTimeObjectCategories}} API calls. [http://www.horde.org/nag/
Nag] (task list) and [http://www.horde.org/whups/ Whups] (ticket
tracking) do it this way. If you are using the Git version, you can
use [http://theupstairsroom.com/93 TimeObjects], which wraps
everything up in a nice class.
@@ -7,9 +7,9 @@
Kronolith calls these functions in {{initialize()}} (when filling
{{$all_external_calendars}}) and {{listEvents()}}. It searches all
APIs for this function, so you can register it with your own prefix.
//timeObject// is a generic name for "things that can be shown on a
calendar", like events, task due dates, ... A //timeObjectCategory//
is a group of //timeObjects//, which can be enabled or disabled in a
group by the user. (In the default layout: using the panel in the
upper-right corner of the calendar view, "Calendars".)
-Your implementation for {{listTimeObjectCategories}} should return an
array, with a category id as the key, and the user-visible name as the
value. The category id's are also shown at the bottom of the calendar,
and the user can define colors for them.
+Your implementation for {{listTimeObjectCategories}} should return an
array, with a category id as the key, and the user-visible name as the
value.
{{listTimeObjects}} is called with the currently selected categories
(an array of id's), and a start and end date. These dates might
already be {{Horde_Date}} objects (to be sure, convert them again:
{{$start = new Horde_Date($start)}}).
You should return an array of //timeObjects// that belong to these
categories and fall in the specified time range. The keys are event
id's, the values are arrays with values for the following keys:
@@ -18,8 +18,8 @@
* {{title}}
* {{description}}
* {{start}} ({{Horde_Date}} or timestamp)
* {{end}} ({{Horde_Date}} or timestamp)
-* {{category}} (Category id)
+* {{category}} (Horde category, not timeobject category)
* {{params}}
If you register the {{show}} API call, this will be used for
creating the link to the //timeObject// detail.
More information about the cvs
mailing list