From: <jo...@us...> - 2005-12-01 06:15:40
|
Update of /cvsroot/phpicalendar/phpicalendar/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19823/functions Modified Files: template.php Log Message: Feature #1353342. You can now specify how many days should be displayed on the week view. All numbers, negative to more than seven, work with the expected behavior. Thanks to Nicolas Contamin for the code changes. Index: template.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/functions/template.php,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** template.php 29 Nov 2005 03:51:50 -0000 1.77 --- template.php 1 Dec 2005 06:15:30 -0000 1.78 *************** *** 232,236 **** function draw_week($template_p) { ! global $unique_colors, $start_week_time, $template, $getdate, $cal, $master_array, $daysofweek_lang, $week_start_day, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $gridLength, $timeFormat_small, $day_start; // Figure out colspans --- 232,236 ---- function draw_week($template_p) { ! global $unique_colors, $start_week_time, $template, $getdate, $cal, $master_array, $daysofweek_lang, $week_start_day, $dateFormat_week_list, $current_view, $day_array, $timeFormat, $gridLength, $timeFormat_small, $day_start, $week_length; // Figure out colspans *************** *** 253,257 **** } ! for ($i=0; $i<7; $i++) { $thisdate = date ('Ymd', $start_week_time); $weekarray[$i] = $thisdate; --- 253,257 ---- } ! for ($i=0; $i<$week_length; $i++) { $thisdate = date ('Ymd', $start_week_time); $weekarray[$i] = $thisdate; *************** *** 290,294 **** $start_wt = strtotime(dateOfWeek($getdate, $week_start_day)); $start_day = strtotime($week_start_day); ! for ($i=0; $i<7; $i++) { $day_num = date("w", $start_day); $daylink = date('Ymd', $start_wt); --- 290,294 ---- $start_wt = strtotime(dateOfWeek($getdate, $week_start_day)); $start_day = strtotime($week_start_day); ! for ($i=0; $i<$week_length; $i++) { $day_num = date("w", $start_day); $daylink = date('Ymd', $start_wt); *************** *** 361,365 **** // loop this part 7 times, one for each day ! for ($week_loop=0; $week_loop<7; $week_loop++) { $thisday = date("Ymd", $thisdate); $dayborder = 0; --- 361,365 ---- // loop this part 7 times, one for each day ! for ($week_loop=0; $week_loop<$week_length; $week_loop++) { $thisday = date("Ymd", $thisdate); $dayborder = 0; |