diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-27 23:18:07 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-27 23:18:07 +0000 |
commit | fb1fa4e8eeb2accaf71675dbf9810ec5af47bc79 (patch) | |
tree | 892273a81e75ff9929c558dc0bb4f6d0d06cbce4 /functions/template.php | |
parent | 195553ad26b4c8c3639041698309b47ae6d1b1f3 (diff) | |
download | phpicalendar-fb1fa4e8eeb2accaf71675dbf9810ec5af47bc79.tar.gz phpicalendar-fb1fa4e8eeb2accaf71675dbf9810ec5af47bc79.tar.bz2 phpicalendar-fb1fa4e8eeb2accaf71675dbf9810ec5af47bc79.zip |
new rss icons;allow subweek calendars
Diffstat (limited to 'functions/template.php')
-rw-r--r-- | functions/template.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/functions/template.php b/functions/template.php index 95b0586..46f5163 100644 --- a/functions/template.php +++ b/functions/template.php @@ -269,7 +269,7 @@ class Page { $event_length[$thisday] = array (); $thisdate = ($thisdate + (25 * 60 * 60)); } - + #echo "<pre>";print_r($nbrGridCols); // Replaces the allday events preg_match("!<\!-- loop allday on -->(.*)<\!-- loop allday off -->!Uis", $this->page, $match1); preg_match("!<\!-- loop alldaysofweek on -->(.*)<\!-- loop allday on -->!Uis", $this->page, $match2); @@ -510,7 +510,7 @@ class Page { $loop_dof = trim($match1[1]); $start_wt = strtotime(dateOfWeek($getdate, $phpiCal_config->week_start_day)); $start_day = strtotime(dateOfWeek($getdate, $phpiCal_config->week_start_day)); - for ($i=0; $i<7; $i++) { + for ($i=0; $i<$phpiCal_config->week_length; $i++) { $day_num = date("w", $start_day); $daylink = date('Ymd', $start_wt); if ($current_view == 'day') { @@ -883,7 +883,7 @@ class Page { $weekday_loop = ''; $middle = ''; - for ($i=0; $i<7; $i++) { + for ($i=0; $i< $phpiCal_config->week_length; $i++) { $day_num = date("w", $start_day); $weekday = $langtype[$day_num]; $start_day = strtotime("+1 day", $start_day); @@ -910,7 +910,7 @@ class Page { } else { $temp = $t_month[2]; } - if (isset($master_array[$daylink])) { + if (isset($master_array[$daylink]) && $i <= $phpiCal_config->week_length) { if ($type != 'small') { foreach ($master_array[$daylink] as $cal_time => $event_times) { foreach ($event_times as $uid => $val) { @@ -953,7 +953,10 @@ class Page { $middle .= $temp; $start_day = strtotime("+1 day", $start_day); - if ($i == 7) { + if ($i == $phpiCal_config->week_length) { + if ($phpiCal_config->week_length != 7) { + $start_day = strtotime("+".(7-$phpiCal_config->week_length)." day", $start_day); + } $i = 0; $middle .= $endweek; $checkagain = date ("m", $start_day); |