[dev] Turba and Kronolith
James Van Sickle
gothbert at spamcop.net
Wed Jul 2 12:18:20 PDT 2003
Hey
I have added two date fields to the Turba address book to track birthdays and
anniversaries. I would like to have Kronolith display these dates in the main
calendar and summmary similar to how it does with Nag Tasks. I found the
following entry for Nag Task display. What would I modify here and in other
files for this to work with the Turba address book date field?
/* Nag Tasks. */
if ($prefs->getValue('show_tasks') &&
(Auth::getAuth() ||
$registry->allowGuests($registry->hasMethod('tasks/list')))) {
$taskList = $registry->call('tasks/list');
$dueEndStamp = mktime(0, 0, 0, $endDate->month, $endDate->mday +
1,$endDate->year);
if (!is_a($taskList, 'PEAR_Error')) {
foreach ($taskList as $task) {
if ($task['due'] >= $startOfPeriodTimestamp && $task['due'] < $dueEndStamp)
{
$event = &$calendar->getEventObject();
$event->setTitle(sprintf(_("Due: %s"), $task['name']));
$event->taskID = $task['task_id'];
$event->tasklistID = $task['tasklist_id'];
$event->setStartTimestamp($task['due']);
$event->setEndTimestamp($task['due'] + 1);
$dayStamp = mktime(0, 0, 0,
date('n', $task['due']),
date('j', $task['due']),
date('Y', $task['due']));
$results[$dayStamp]['_task' . $task['task_id']] = $event;
}}}}
-James
More information about the dev
mailing list