diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-05-23 23:31:21 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-05-23 23:31:21 +0000 |
commit | 2f54cb154be1496a1e6545e377df9eee1dcee7f7 (patch) | |
tree | 14d32f618ca69d0c81b1e4c74e0fe4a0ad59007f | |
parent | d2174d8d9b99ded409e70e1bf70f46488a6c4457 (diff) | |
download | phpicalendar-2f54cb154be1496a1e6545e377df9eee1dcee7f7.tar.gz phpicalendar-2f54cb154be1496a1e6545e377df9eee1dcee7f7.tar.bz2 phpicalendar-2f54cb154be1496a1e6545e377df9eee1dcee7f7.zip |
Updates to CSS, speed tweeks to template.php
-rw-r--r-- | functions/template.php | 42 | ||||
-rw-r--r-- | templates/default/day.tpl | 4 | ||||
-rw-r--r-- | templates/default/default.css | 6 | ||||
-rw-r--r-- | templates/default/images/allday_6.gif | bin | 151 -> 151 bytes | |||
-rw-r--r-- | templates/default/images/monthdot_6.gif | bin | 88 -> 86 bytes | |||
-rw-r--r-- | templates/default/week.tpl | 4 |
6 files changed, 29 insertions, 27 deletions
diff --git a/functions/template.php b/functions/template.php index 7ddcd9f..85d87ed 100644 --- a/functions/template.php +++ b/functions/template.php @@ -22,8 +22,8 @@ class Page { $loop_day = trim($match3[1]); foreach($master_array as $key => $val) { - ereg ("([0-9]{6})([0-9]{2})", $key, $regs); - if ((($regs[1] == $parse_month) && ($printview == "month")) || (($key == $getdate) && ($printview == "day")) || ((($key >= $week_start) && ($key <= $week_end)) && ($printview == "week"))) { + preg_match ('/([0-9]{6})([0-9]{2})/', $key, $regs); + if ((($regs[1] == $parse_month) && ($printview == 'month')) || (($key == $getdate) && ($printview == 'day')) || ((($key >= $week_start) && ($key <= $week_end)) && ($printview == 'week'))) { $events_week++; $dayofmonth = strtotime ($key); $dayofmonth = localizeDate ($dateFormat_day, $dayofmonth); @@ -34,16 +34,16 @@ class Page { // Pull out each day foreach ($val as $new_val) { foreach ($new_val as $new_key2 => $new_val2) { - if ($new_val2["event_text"]) { - $event_text = stripslashes(urldecode($new_val2["event_text"])); - $description = stripslashes(urldecode($new_val2["description"])); - $event_start = $new_val2["event_start"]; - $event_end = $new_val2["event_end"]; - if (isset($new_val2["display_end"])) $event_end = $new_val2["display_end"]; + if ($new_val2['event_text']) { + $event_text = stripslashes(urldecode($new_val2['event_text'])); + $description = stripslashes(urldecode($new_val2['description'])); + $event_start = $new_val2['event_start']; + $event_end = $new_val2['event_end']; + if (isset($new_val2['display_end'])) $event_end = $new_val2['display_end']; $event_start = date ($timeFormat, strtotime ($event_start)); $event_end = date ($timeFormat, strtotime ($event_end)); - $event_start = "$event_start - $event_end"; - if (!$new_val2["event_start"]) { + $event_start = $event_start .' - '.$event_end; + if (!$new_val2['event_start']) { $event_start = $lang['l_all_day']; $event_start2 = ''; $event_end = ''; @@ -121,8 +121,8 @@ class Page { $event_url = $allday['url']; if ($event_calno < 1) $event_calno=1; if ($event_calno > 7) $event_calno=7; - $event = openevent($event_calna, '', '', $allday, 1, 11, '<span class="V9W">', '</span>', 'psf', $event_url); - $loop_tmp = str_replace('{EVENT}', $event, $loop_ad); + $event = openevent($event_calna, '', '', $allday, 1, 11, '', '', 'psf', $event_url); + $loop_tmp = str_replace('{ALLDAY}', $event, $loop_ad); $loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp); $replace .= $loop_tmp; } @@ -173,7 +173,7 @@ class Page { $event_length = array (); $border = 0; - ereg ('([0-9]{4})([0-9]{2})([0-9]{2})', $getdate, $day_array2); + preg_match ('/([0-9]{4})([0-9]{2})([0-9]{2})/', $getdate, $day_array2); $this_day = $day_array2[3]; $this_month = $day_array2[2]; $this_year = $day_array2[1]; @@ -185,7 +185,7 @@ class Page { } foreach ($day_array as $key) { $cal_time = $key; - ereg('([0-9]{2})([0-9]{2})', $key, $regs_tmp); + preg_match('/([0-9]{2})([0-9]{2})/', $key, $regs_tmp); $key = mktime($regs_tmp[1],$regs_tmp[2],0,$this_month,$this_day,$this_year); $key = date ($timeFormat, $key); @@ -216,7 +216,7 @@ class Page { $this_time_arr = $master_array[$thisday][$cal_time]; } - if ("$day_start" == "$cal_time" && isset($master_array[$thisday]) && is_array($master_array[$thisday])) { + if ($day_start == $cal_time && isset($master_array[$thisday]) && is_array($master_array[$thisday])) { foreach($master_array[$thisday] as $time_key => $time_arr) { if ((int)$time_key < (int)$cal_time && is_array($time_arr) && $time_key != '-1') { foreach($time_arr as $event_tmp) { @@ -345,8 +345,8 @@ class Page { $event_url = $allday['url']; if ($event_calno < 1) $event_calno=1; if ($event_calno > 7) $event_calno=7; - $event = openevent($event_calna, '', '', $allday, 0, '', '<span class="V10WB">', '</span>', 'psf', $event_url); - $loop_tmp = str_replace('{EVENT}', $event, $loop_ad); + $event = openevent($event_calna, '', '', $allday, 0, '', '', '', '', $event_url); + $loop_tmp = str_replace('{ALLDAY}', $event, $loop_ad); $loop_tmp = str_replace('{CALNO}', $event_calno, $loop_tmp); $replace .= $loop_tmp; } @@ -404,12 +404,12 @@ class Page { $event_length = array (); $border = 0; - ereg ('([0-9]{4})([0-9]{2})([0-9]{2})', $getdate, $day_array2); + preg_match('/([0-9]{4})([0-9]{2})([0-9]{2})/', $getdate, $day_array2); $this_day = $day_array2[3]; $this_month = $day_array2[2]; $this_year = $day_array2[1]; foreach ($day_array as $key) { - ereg('([0-9]{2})([0-9]{2})', $key, $regs_tmp); + preg_match('/([0-9]{2})([0-9]{2})/', $key, $regs_tmp); $cal_time = $key; $key = mktime($regs_tmp[1],$regs_tmp[2],0,$this_month,$this_day,$this_year); $key = date ($timeFormat, $key); @@ -452,11 +452,11 @@ class Page { } } } - if (ereg('([0-9]{1,2}):00', $key)) { + if (preg_match('/([0-9]{1,2}):00/', $key)) { $daydisplay .= '<tr>'."\n"; $daydisplay .= '<td rowspan="' . (60 / $gridLength) . '" align="center" valign="top" width="60" class="timeborder">'.$key.'</td>'."\n"; $daydisplay .= '<td bgcolor="#a1a5a9" width="1" height="' . $gridLength . '"></td>'."\n"; - } elseif("$cal_time" == "$day_start") { + } elseif($cal_time == $day_start) { $size_tmp = 60 - (int)substr($cal_time,2,2); $daydisplay .= '<tr>'."\n"; $daydisplay .= "<td rowspan=\"" . ($size_tmp / $gridLength) . "\" align=\"center\" valign=\"top\" width=\"60\" class=\"timeborder\">$key</td>\n"; diff --git a/templates/default/day.tpl b/templates/default/day.tpl index 1e18b0d..ae7598c 100644 --- a/templates/default/day.tpl +++ b/templates/default/day.tpl @@ -44,11 +44,11 @@ </table> </td> </tr> - <tr> + <tr id="allday"> <td> <!-- loop allday on --> <div class="alldaybg_{CALNO}"> - {EVENT} + {ALLDAY} </div> <!-- loop allday off --> </td> diff --git a/templates/default/default.css b/templates/default/default.css index ed5eb5b..20e61f8 100644 --- a/templates/default/default.css +++ b/templates/default/default.css @@ -29,15 +29,17 @@ table, td {font: 11px Verdana, Arial, sans-serif; color: #000;} .eventbg_3 { background-color: #E84F25; padding: 2px;}
.eventbg_4 { background-color: #B257A2; padding: 2px;}
.eventbg_5 { background-color: #D42020; padding: 2px;}
-.eventbg_6 { background-color: #CCB21F; padding: 2px;}
+.eventbg_6 { background-color: #B88F0B; padding: 2px;}
.eventbg_7 { background-color: #73738C; padding: 2px;}
+#allday a { font-size: 9px; color: #fff; font-weight: 900; text-decoration:none;}
+#allday a:hover { text-decoration:underline;}
.eventbg2_1 { background-color: #6699CC; border: 1px solid #557CA3; }
.eventbg2_2 { background-color: #4FC464; border: 1px solid #53A062; }
.eventbg2_3 { background-color: #FF6D3B; border: 1px solid #E84F25; }
.eventbg2_4 { background-color: #EA62D4; border: 1px solid #B257A2; }
.eventbg2_5 { background-color: #FF5E56; border: 1px solid #D42020; }
-.eventbg2_6 { background-color: #FFEB4A; border: 1px solid #CCB21F; }
+.eventbg2_6 { background-color: #CCB21F; border: 1px solid #B88F0B; }
.eventbg2_7 { background-color: #9292A1; border: 1px solid #73738C; }
.dayborder { background-color: #fff; border-top: 1px solid #A1A5A9; }
diff --git a/templates/default/images/allday_6.gif b/templates/default/images/allday_6.gif Binary files differindex 0a68d01..74df382 100644 --- a/templates/default/images/allday_6.gif +++ b/templates/default/images/allday_6.gif diff --git a/templates/default/images/monthdot_6.gif b/templates/default/images/monthdot_6.gif Binary files differindex 7ae8cd3..63b0519 100644 --- a/templates/default/images/monthdot_6.gif +++ b/templates/default/images/monthdot_6.gif diff --git a/templates/default/week.tpl b/templates/default/week.tpl index 1d6d34c..d3f7a70 100644 --- a/templates/default/week.tpl +++ b/templates/default/week.tpl @@ -51,14 +51,14 @@ </td> <!-- loop daysofweek off --> </tr> - <tr valign="top"> + <tr valign="top" id="allday"> <td width="60" class="rowOff2" colspan="4"><img src="images/spacer.gif" width="60" height="1" alt=" " /></td> <td width="1"></td> <!-- loop alldaysofweek on --> <td width="80" {COLSPAN} class="rowOff"> <!-- loop allday on --> <div class="alldaybg_{CALNO}"> - <b>{EVENT}</b> + {ALLDAY} <img src="images/spacer.gif" width="80" height="1" alt=" " /> </div> <!-- loop allday off --> |