[kronolith] Showing time in Month View

Oliver Schönrock oliver@schonrocks.com
Wed, 11 Sep 2002 11:19:24 +0100


After repeated user requests, I made a small mod to Kronolith 1.0 which 
allows the user to show the start time of events in the Month view.

I think this works well (ie doesn't create too much clutter) for mere 
mortals who only have a 2 or 3 events per day. It gives you a nice overview 
of the month with little need to go to week or day view. The user can 
activate this mod via a preference setting under "user Interface" and the 
time display is formatted according to the 24hr preference setting.

This is my first "published mod" so excuse if it's not clear or bad code 
;-). Comments improvement are welcome.

The Mod:

OPEN file kronolith/month.php

GOTO line 158 ie just after:
Horde::pimg('bullet.gif', 'align="bottom" alt="*"');

INSERT the following code:
            if ($prefs->getValue('show_time_month')) {
                $timeshow = date(($prefs->getValue('twentyFour')) ? 'G:i' : 
'g:ia', $e['d']).' ';
            } else {
                $timeshow = '';
		}

CHANGE the next Line:
            echo htmlspecialchars($e['title'], ENT_QUOTES, 
Lang::getCharset()) . '</a>';
TO:
            echo htmlspecialchars ($timeshow.$e['title'], ENT_QUOTES, 
Lang::getCharset()) . '</a>';

SAVE file kronolith/month.php

OPEN file kronolith/conf/prefs.php

GOTO line 26
CHANGE this line:
    'members' => array('confirm_delete', 'defaultview', 'half', 
'week_start_monday', 'day_hour_start', 'day_hour_end'));
TO:
    'members' => array('confirm_delete', 'defaultview', 'half', 
'show_time_month', 'week_start_monday', 'day_hour_start', 'day_hour_end'));

GOTO line 98
INSERT the following code:
// showing start time on the month view
$_prefs['show_time_month'] = array(
    'value' => 0,
    'locked' => false,
    'shared' => false,
    'type' => 'checkbox',
    'desc' => _("Show start time in month view?"));

SAVE file kronolith/conf/prefs.php

END of Mod

Enjoy!


Oliver Schönrock