diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-01-23 15:36:07 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-01-23 15:36:07 +0000 |
commit | 1f54afa5281272bd9e2873ad3bf1f1b143c0e2de (patch) | |
tree | e6ebd1b62f6062c9a60bafb1c76f57df6f2dac59 /modules/archive | |
parent | 8d723826629106dc4d1cb4737857300632077d1a (diff) | |
download | brdo-1f54afa5281272bd9e2873ad3bf1f1b143c0e2de.tar.gz brdo-1f54afa5281272bd9e2873ad3bf1f1b143c0e2de.tar.bz2 |
- Patch #15655 by Goba: allow blank days in the calendar to be styled using CSS, and tidied up the calendar's CSS.
Diffstat (limited to 'modules/archive')
-rw-r--r-- | modules/archive/archive.module | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/archive/archive.module b/modules/archive/archive.module index f99375217..122943dbe 100644 --- a/modules/archive/archive.module +++ b/modules/archive/archive.module @@ -119,10 +119,10 @@ function archive_calendar($original = 0) { // Loop through all the days of the month: while ($nday <= $last) { - // Set up blank days for first week of the month: + // Set up blank days for first week of the month (allowing individual blank day styling): if ($first != $weekstart) { $blankdays = ($first - $weekstart + 7) % 7; - $output .= " <tr class=\"row-week\"><td class=\"day-blank\" colspan=\"$blankdays\"> </td>\n"; + $output .= " <tr class=\"row-week\">" . str_repeat("<td class=\"day-blank\"> </td>\n", $blankdays); $first = $weekstart; } // Start every week on a new line: @@ -164,10 +164,10 @@ function archive_calendar($original = 0) { $nday++; } - // Complete the calendar: + // Complete the calendar (allowing individual blank day styling): if ($sday != $weekstart) { $end = (7 - $sday + $weekstart) % 7; - $output .= " <td class=\"day-blank\" colspan=\"$end\"> </td>\n </tr>\n"; + $output .= str_repeat("<td class=\"day-blank\"> </td>\n", $end) . "</tr>\n"; } $output .= "</table></div>\n\n"; |