[Comoblog-commit] comoblog/modules/mod_calendar mod_calendar.php,1.8,1.9
Status: Inactive
Brought to you by:
markwallis
|
From: Mark W. \(a. serialmonkey\) <mar...@us...> - 2006-02-16 12:13:35
|
Update of /cvsroot/comoblog/comoblog/modules/mod_calendar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31719 Modified Files: mod_calendar.php Log Message: Move sunday highlighting inline with alternative start days Index: mod_calendar.php =================================================================== RCS file: /cvsroot/comoblog/comoblog/modules/mod_calendar/mod_calendar.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- mod_calendar.php 15 Feb 2006 04:13:44 -0000 1.8 +++ mod_calendar.php 16 Feb 2006 12:13:03 -0000 1.9 @@ -238,6 +238,11 @@ "; $res = mysql_query($query); +if (convert_offset(CFG_CALENDAR_DAY_OFFSET) == 0) + $start_column = 1; +else + $start_column = 8 - convert_offset(CFG_CALENDAR_DAY_OFFSET); + $posts = array(); while ($row = mysql_fetch_row($res)) { $created_date = getdate($row[0]); @@ -247,7 +252,7 @@ for ($cnt = 0; $cnt < $start_day; $cnt++) // void cells (at beginning of month) { - if ($cnt == 0) + if ($cnt == $start_column) $css_class = "calendar_sunday"; else $css_class = "calendar_day"; @@ -271,7 +276,7 @@ elseif ($cnt == $current_date['mday']) $css_class = 'calendar_selected'; // elseif sunday - elseif ($start_day == 1) + elseif ($start_day == $start_column) $css_class = 'calendar_sunday'; // else else |