[Comoblog-commit] comoblog/modules/mod_calendar mod_calendar.php,1.4,1.5
Status: Inactive
Brought to you by:
markwallis
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2005-10-07 15:49:26
|
Update of /cvsroot/comoblog/comoblog/modules/mod_calendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21397/modules/mod_calendar Modified Files: mod_calendar.php Log Message: RFE: 1280382 - Start worked on alternative next/prev calendar buttons. Config added and next/prev day/month are working. Next/prev posted day still to be completed Index: mod_calendar.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_calendar/mod_calendar.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mod_calendar.php 7 Oct 2005 15:29:47 -0000 1.4 +++ mod_calendar.php 7 Oct 2005 15:49:15 -0000 1.5 @@ -96,8 +96,20 @@ $current_start = mktime (0,0,0,$current_date['mon'],$current_date['mday'],$current_date['year']); $current_date = getdate($current_start); -$next_timestamp = mktime (0,0,0,$current_date['mon'],$current_date['mday'] + 1,$current_date['year']); -$prev_timestamp = mktime (0,0,0,$current_date['mon'],$current_date['mday'] - 1,$current_date['year']); +if (CFG_CALENDAR_BUTTON_CONFIG == "Skip One Day") +{ + $next_timestamp = mktime (0,0,0,$current_date['mon'],$current_date['mday'] + 1,$current_date['year']); + $prev_timestamp = mktime (0,0,0,$current_date['mon'],$current_date['mday'] - 1,$current_date['year']); +} +else if (CFG_CALENDAR_BUTTON_CONFIG == "Skip One Month") +{ + $next_timestamp = mktime (0,0,0,$current_date['mon'] + 1,$current_date['mday'],$current_date['year']); + $prev_timestamp = mktime (0,0,0,$current_date['mon'] - 1,$current_date['mday'],$current_date['year']); +} +else +{ + +} $pd = getdate($prev_timestamp); if ($pd['mon'] < 10) $pd['mon'] = '0'.$pd['mon']; |