diff options
author | Chad Little <clittle@users.sourceforge.net> | 2004-01-28 07:27:23 +0000 |
---|---|---|
committer | Chad Little <clittle@users.sourceforge.net> | 2004-01-28 07:27:23 +0000 |
commit | c5e73fa883662edaeef6da6a308f6631b6f0eca5 (patch) | |
tree | 42d148f0935a961f8bcc02514c0f04f946dfc5ea | |
parent | 603060dd7b43d47ac4637fee17b818cba6dff3c8 (diff) | |
download | phpicalendar-c5e73fa883662edaeef6da6a308f6631b6f0eca5.tar.gz phpicalendar-c5e73fa883662edaeef6da6a308f6631b6f0eca5.tar.bz2 phpicalendar-c5e73fa883662edaeef6da6a308f6631b6f0eca5.zip |
Major checkin, modified english to new language style. Preferences now
template driven along with event and todo. Header and footer seem to work
as well.
-rw-r--r-- | functions/calendar_functions.php | 10 | ||||
-rw-r--r-- | functions/init.inc.php | 3 | ||||
-rw-r--r-- | functions/template.php | 8 | ||||
-rw-r--r-- | includes/event.php | 7 | ||||
-rw-r--r-- | includes/todo.php | 28 | ||||
-rw-r--r-- | languages/english.inc.php | 80 | ||||
-rw-r--r-- | preferences.php | 316 | ||||
-rw-r--r-- | templates/default/event.tpl | 10 | ||||
-rw-r--r-- | templates/default/footer.tpl | 12 | ||||
-rw-r--r-- | templates/default/header.tpl | 8 | ||||
-rw-r--r-- | templates/default/preferences.tpl | 34 | ||||
-rw-r--r-- | templates/default/todo.tpl | 8 |
12 files changed, 198 insertions, 326 deletions
diff --git a/functions/calendar_functions.php b/functions/calendar_functions.php index 56b0fa2..1602f2f 100644 --- a/functions/calendar_functions.php +++ b/functions/calendar_functions.php @@ -179,16 +179,18 @@ function display_ical_list($cals) { // trying to figure out if this is the selected calendar. $cal_httpPrefix_tmp = str_replace('webcal://', 'http://', $cal_tmp); if ($cal_httpPrefix_tmp == urldecode($cal)) { - print "<option value=\"$current_view.php?cal=$cal_encoded_tmp&getdate=$getdate\" selected>$cal_displayname_tmp</option>"; + $return .= "<option value=\"$current_view.php?cal=$cal_encoded_tmp&getdate=$getdate\" selected>$cal_displayname_tmp</option>"; } else { - print "<option value=\"$current_view.php?cal=$cal_encoded_tmp&getdate=$getdate\">$cal_displayname_tmp</option>"; + $return .= "<option value=\"$current_view.php?cal=$cal_encoded_tmp&getdate=$getdate\">$cal_displayname_tmp</option>"; } } // option to open all (non-web) calenders together if ($cal == $ALL_CALENDARS_COMBINED) { - print "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED&getdate=$getdate\" selected>$all_cal_comb_lang</option>"; + $return .= "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED&getdate=$getdate\" selected>$all_cal_comb_lang</option>"; } else { - print "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED&getdate=$getdate\">$all_cal_comb_lang</option>"; + $return .= "<option value=\"$current_view.php?cal=$ALL_CALENDARS_COMBINED&getdate=$getdate\">$all_cal_comb_lang</option>"; } + + return $return; }
\ No newline at end of file diff --git a/functions/init.inc.php b/functions/init.inc.php index d2b2d90..e6ba8e2 100644 --- a/functions/init.inc.php +++ b/functions/init.inc.php @@ -176,4 +176,7 @@ if ($is_webcal) { } } } + +$rss_powered = ($enable_rss == 'yes') ? 'yes' : ''; + ?> diff --git a/functions/template.php b/functions/template.php index ebecf7a..68f4b81 100644 --- a/functions/template.php +++ b/functions/template.php @@ -35,7 +35,13 @@ class Page { else die('No tags designated for replacement.'); } - + + function replace_langs($langs = array()) { + foreach ($langs as $tag => $data) { + $this->page = eregi_replace('{' . $tag . '}', $data, $this->page); + } + } + function output() { print($this->page); } diff --git a/includes/event.php b/includes/event.php index 3caad2f..803403f 100644 --- a/includes/event.php +++ b/includes/event.php @@ -65,17 +65,12 @@ $page->replace_tags(array( 'event' => $event, 'event_times' => $event_times, 'description' => $description, - 'organizer_lang' => $organizer_lang, 'organizer' => $organizer, - 'attendee_lang' => $attendee_lang, 'attendee' => $attendee, - 'status_lang' => $status_lang, 'status' => $status, - 'location_lang' => $location_lang, 'location' => $location, - 'sheet_href' => $sheet_href, 'cal_title_full' => $cal_title_full, - 'template' => $template, + 'template' => $template )); diff --git a/includes/todo.php b/includes/todo.php index d9933d7..e783380 100644 --- a/includes/todo.php +++ b/includes/todo.php @@ -17,56 +17,46 @@ $start_date = (isset($vtodo_array['start_date'])) ? localizeDate ($dateFormat_d $due_date = (isset($vtodo_array['due_date'])) ? localizeDate ($dateFormat_day, strtotime($vtodo_array['due_date'])) : (''); $priority = (isset($vtodo_array['priority'])) ? $vtodo_array['priority'] : (''); -$cal_title_full = $calendar_name.' '.$calendar_lang; +$cal_title_full = $calendar_name.' '.$lang['l_calendar']; $description = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", '<a target="_new" href="\0">\0</a>', $description); $vtodo_text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]",'<a target="_new" href="\0">\0</a>',$vtodo_text); if ((!isset($status) || $status == "COMPLETED") && isset($completed_date)) { - $status = "$completed_date_lang $completed_date"; -} else if ($status == "COMPLETED") { + $status = $lang['l_completed_date'] . ' ' . $completed_date; +} elseif ($status == "COMPLETED") { $status = $completed_lang; } else { $status = $unfinished_lang; } if ($priority >= 1 && $priority <= 4) { - $priority = $priority_high_lang; + $priority = $lang['l_priority_high']; } else if ($priority == 5) { - $priority = $priority_medium_lang; + $priority = $lang['l_priority_medium']; } else if ($priority >= 6 && $priority <= 9) { - $priority = $priority_low_lang; + $priority = $lang['l_priority_low']; } else { - $priority = $priority_none_lang; + $priority = $lang['l_priority_none']; } -$display = ''; -if ($vtodo_text != '') $display .= $vtodo_text.'<br><br>'; -if ($description != '') $display .= $description.'<br>'; -if ($status != '') $display .= $status_lang.': '.$status.'<br>'; -if ($priority != '') $display .= $priority_lang.' '.$priority.'<br>'; -if ($start_date != '') $display .= $created_lang.' '.$start_date.'<br>'; -if ($due_date != '') $display .= $due_lang.' '.$due_date.'<br>'; - $page = new Page(BASE.'templates/'.$template.'/todo.tpl'); $page->replace_tags(array( 'cal' => $cal_title_full, 'vtodo_text' => $vtodo_text, 'description' => $description, - 'priority_lang' => $priority_lang, 'priority' => $priority, - 'created_lang' => $created_lang, 'start_date' => $start_date, - 'status_lang' => $status_lang, 'status' => $status, - 'due_lang' => $due_lang, 'due_date' => $due_date, 'cal_title_full' => $cal_title_full, 'template' => $template )); +$page->replace_langs($lang); + $page->output(); ?>
\ No newline at end of file diff --git a/languages/english.inc.php b/languages/english.inc.php index 9e6344f..ea4e2c7 100644 --- a/languages/english.inc.php +++ b/languages/english.inc.php @@ -49,46 +49,46 @@ $goprint_lang = 'Printer Friendly'; $time_lang = 'Time'; $summary_lang = 'Summary'; $description_lang = 'Description'; -$this_site_is_lang = 'This site is'; -$no_events_day_lang = 'No events today.'; -$no_events_week_lang = 'No events this week.'; -$no_events_month_lang = 'No events this month.'; -$rss_day_date = 'g:i A'; // Lists just the time -$rss_week_date = '%b %e'; // Lists just the day -$rss_month_date = '%b %e'; // Lists just the day -$rss_language = 'en-us'; -$search_took_lang = 'Search took %s seconds'; -$recurring_event_lang = 'Recurring event'; -$exception_lang = 'Exception'; -$no_query_lang = 'No query given'; -$preferences_lang = 'Preferences'; -$printer_lang = 'Printer'; -$select_lang_lang = 'Select your default language'; -$select_cal_lang = 'Select your default calendar'; -$select_view_lang = 'Select your default view'; -$select_time_lang = 'Select your default start time'; -$select_day_lang = 'Select your default start day of week'; -$select_style_lang = 'Select your default style'; -$set_prefs_lang = 'Set preferences'; -$completed_date_lang = 'Completed on'; -$completed_lang = 'Completed'; -$created_lang = 'Created'; -$due_lang = 'Due'; -$priority_lang = 'Priority'; -$priority_high_lang = 'High'; -$priority_low_lang = 'Low'; -$priority_medium_lang = 'Medium'; -$priority_none_lang = 'None'; -$status_lang = 'Status'; -$todo_lang = 'To do items'; -$unfinished_lang = 'Unfinished'; -$prefs_set_lang = 'Your preferences have been set.'; -$prefs_unset_lang = 'Preferences unset. Changes will take place next page load.'; -$unset_prefs_lang = 'Unset preferences'; -$organizer_lang = 'Organizer'; -$attendee_lang = 'Attendee'; -$status_lang = 'Status'; -$location_lang = 'Location'; +$lang['l_this_site_is'] = 'This site is'; +$no_events_day_lang = 'No events today.'; +$no_events_week_lang = 'No events this week.'; +$no_events_month_lang = 'No events this month.'; +$rss_day_date = 'g:i A'; // Lists just the time +$rss_week_date = '%b %e'; // Lists just the day +$rss_month_date = '%b %e'; // Lists just the day +$rss_language = 'en-us'; +$search_took_lang = 'Search took %s seconds'; +$recurring_event_lang = 'Recurring event'; +$exception_lang = 'Exception'; +$no_query_lang = 'No query given'; +$lang['l_preferences'] = 'Preferences'; +$printer_lang = 'Printer'; +$lang['l_select_lang'] = 'Select your default language'; +$lang['l_select_cal'] = 'Select your default calendar'; +$lang['l_select_view'] = 'Select your default view'; +$lang['l_select_time'] = 'Select your default start time'; +$lang['l_select_day'] = 'Select your default start day of week'; +$lang['l_select_style'] = 'Select your default style'; +$lang['l_set_prefs'] = 'Set preferences'; +$lang['l_completed_date'] = 'Completed on'; +$lang['l_completed'] = 'Completed'; +$lang['l_created'] = 'Created'; +$lang['l_due'] = 'Due'; +$lang['l_priority'] = 'Priority'; +$lang['l_priority_high'] = 'High'; +$lang['l_priority_low'] = 'Low'; +$lang['l_priority_medium'] = 'Medium'; +$lang['l_priority_none'] = 'None'; +$lang['l_status'] = 'Status'; +$lang['l_todo'] = 'To do items'; +$lang['l_unfinished'] = 'Unfinished'; +$lang['l_prefs_set'] = 'Your preferences have been set.'; +$lang['l_prefs_unset'] = 'Preferences unset. Changes will take place next page load.'; +$lang['l_unset_prefs'] = 'Unset preferences'; +$lang['l_organizer'] = 'Organizer'; +$lang['l_attendee'] = 'Attendee'; +$lang['l_status'] = 'Status'; +$lang['l_location'] = 'Location'; $admin_header_lang = 'PHP iCalendar Administration'; $username_lang = 'Username'; $password_lang = 'Password'; diff --git a/preferences.php b/preferences.php index 2aa7ba0..b791212 100644 --- a/preferences.php +++ b/preferences.php @@ -1,7 +1,8 @@ <?php define('BASE','./'); -include(BASE.'functions/ical_parser.php'); +include_once(BASE.'functions/ical_parser.php'); +require_once(BASE.'functions/template.php'); $display_date = $preferences_lang; if ($cookie_uri == '') { @@ -50,10 +51,6 @@ if (isset($HTTP_COOKIE_VARS['phpicalendar'])) { unset ($cookie_language, $cookie_calendar, $cookie_view, $cookie_style,$cookie_startday); } } -#echo "$cookie_uri"; -#print_r(unserialize($HTTP_COOKIE_VARS['phpicalendar'])); -#print_r($phpicalendar); - if ((!isset($HTTP_COOKIE_VARS['phpicalendar'])) || ($cookie_unset)) { # No cookie set -> use defaults from config file. @@ -65,222 +62,97 @@ if ((!isset($HTTP_COOKIE_VARS['phpicalendar'])) || ($cookie_unset)) { $cookie_time = $day_start; } -include (BASE.'includes/header.inc.php'); +if ($action == 'setcookie') { + if (!$cookie_unset) { + $message = $lang['l_prefs_set']; + } else { + $message = $lang['l_prefs_unset']; + } +} else { + $message = ''; +} -?> -<center> -<table border="0" width="700" cellspacing="0" cellpadding="0"> - <tr> - <td width="520" valign="top" align="center"> - <table width="640" border="0" cellspacing="0" cellpadding="0" class="calborder"> - <tr> - <td align="center" valign="middle"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td align="left" width="120" class="navback"><?php echo '<a href="'.$back_page.'"><img src="'.BASE.'styles/'.$style_sheet.'/back.gif" alt=" " border="0" align="left"></a>'; ?></td> - <td class="navback"> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td align="center" class="navback" nowrap valign="middle"><font class="H20"><?php echo "$preferences_lang"; ?></font></td> - </tr> - </table> - </td> - <td align="right" width="120" class="navback"> - <table width="120" border="0" cellpadding="0" cellspacing="0"> - <tr> - <td><?php echo '<a class="psf" href="'.BASE.'day.php?cal='.$cal.'&getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/day_on.gif" alt=" " border="0"></a></td>'; ?> - <td><?php echo '<a class="psf" href="'.BASE.'week.php?cal='.$cal.'&getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/week_on.gif" alt=" " border="0"></a></td>'; ?> - <td><?php echo '<a class="psf" href="'.BASE.'month.php?cal='.$cal.'&getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/month_on.gif" alt=" " border="0"></a></td>'; ?> - <td><?php echo '<a class="psf" href="'.BASE.'year.php?cal='.$cal.'&getdate='.$getdate.'"><img src="'.BASE.'styles/'.$style_sheet.'/year_on.gif" alt=" " border="0"></a></td>'; ?> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> - <tr> - <td class="dayborder"><img src="images/spacer.gif" width="1" height="5" alt=" "></td> - </tr> - <tr> - <td> - <table width="100%" border="0" cellspacing="0" cellpadding="0" class="G10B"> - <?php - if ($action == 'setcookie') { - if (!$cookie_unset) { - $message = $prefs_set_lang; - } else { - $message = $prefs_unset_lang; - } - ?> - <tr> - <td colspan="2" align="center"><font class="G10BOLD"><?php echo "$message"; ?></font></td> - </tr> - <?php } ?> - <tr> - <td width="2%"></td> - <td width="98%" valign="top" align="left"> - <form action="preferences.php?action=setcookie" METHOD="post"> - <table border="0" width="620" cellspacing="2" cellpadding="2" align="center"> - <tr> - <td align="left" valign="top" width="300" nowrap><?php echo "$select_lang_lang"; ?></td> - <td align="left" valign="top" width="20"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top" width="300"> - <?php - - // Begin Language Selection - // - print "<select name=\"cookie_language\" class=\"query_style\">\n"; - $dir_handle = @opendir(BASE.'languages/'); - $tmp_pref_language = urlencode(ucfirst($language)); - while ($file = readdir($dir_handle)) { - if (substr($file, -8) == ".inc.php") { - $language_tmp = urlencode(ucfirst(substr($file, 0, -8))); - if ($language_tmp == $cookie_language) { - print "<option value=\"$language_tmp\" selected>$language_tmp</option>\n"; - } else { - print "<option value=\"$language_tmp\">$language_tmp</option>\n"; - } - } - } - closedir($dir_handle); - print "</select>\n"; - ?> - </td> - </tr> - <tr> - <td align="left" valign="top" width="300" nowrap><?php echo "$select_cal_lang"; ?></td> - <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"> - <?php - - // Begin Calendar Selection - // - print "<select name=\"cookie_calendar\" class=\"query_style\">\n"; - display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); - print "</select>\n"; - ?> - </td> - </tr> - <tr> - <td align="left" valign="top" width="300" nowrap><?php echo "$select_view_lang"; ?></td> - <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"> - <?php - - // Begin View Selection - // - print "<select name=\"cookie_view\" class=\"query_style\">\n"; - print "<option value=\"day\""; - if ($cookie_view == "day") print " selected"; - print ">$day_lang</option>\n"; - print "<option value=\"week\""; - if ($cookie_view == "week") print " selected"; - print ">$week_lang</option>\n"; - print "<option value=\"month\""; - if ($cookie_view == "month") print " selected"; - print ">$month_lang</option>\n"; - //print "<option value=\"print\""; - //if ($cookie_view == "print") print " selected"; - //print ">$printer_lang</option>\n"; - print "</select>\n"; - ?> - </td> - </tr> - <tr> - <td align="left" valign="top" width="300" nowrap><?php echo "$select_time_lang"; ?></td> - <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"> - <?php - - // Begin Time Selection - // - print "<select name=\"cookie_time\" class=\"query_style\">\n"; - for ($i = 500; $i <= 900; $i += 100) { - $s = sprintf("%04d", $i); - print "<option value=\"$s\""; - if ($s == $cookie_time) { - print " selected"; - } - print ">$s</option>\n"; - } - print "</select>\n"; - ?> - </td> - </tr> - <tr> - <td align="left" valign="top" width="300" nowrap><?php echo "$select_day_lang"; ?></td> - <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"> - <?php - - // Begin Day Start Selection - // - print "<select name=\"cookie_startday\" class=\"query_style\">\n"; - $i=0; - foreach ($daysofweek_lang as $daysofweek) { - if ($startdays[$i] == "$cookie_startday") { - print "<option value=\"$startdays[$i]\" selected>$daysofweek</option>\n"; - } else { - print "<option value=\"$startdays[$i]\">$daysofweek</option>\n"; - } - $i++; - } - print "</select>\n"; - ?> - </td> - </tr> - <tr> - <td align="left" valign="top" width="300" nowrap><?php echo "$select_style_lang"; ?></td> - <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"> - <?php - - // Begin Style Selection - // - print "<select name=\"cookie_style\" class=\"query_style\">\n"; - $dir_handle = @opendir(BASE.'styles/'); - while ($file = readdir($dir_handle)) { - if (($file != ".") && ($file != "..") && ($file != "CVS")) { - if (!is_file($file)) { - $file_disp = ucfirst($file); - if ($file == "$cookie_style") { - print "<option value=\"$file\" selected>$file_disp</option>\n"; - } else { - print "<option value=\"$file\">$file_disp</option>\n"; - } - } - } - } - closedir($dir_handle); - print "</select>\n"; - ?> - </td> - </tr> - <?php if (isset($HTTP_COOKIE_VARS['phpicalendar'])) { ?> - <tr> - <td align="left" valign="top" nowrap><?php echo "$unset_prefs_lang"; ?></td> - <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"><INPUT TYPE="checkbox" NAME="unset" VALUE="true"></td> - </tr> - <?php } ?> - <tr> - <td align="left" valign="top" nowrap> </td> - <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"><input type="submit" name="set" value="<?php echo "$set_prefs_lang"; ?>"></button></td> - </tr> - </table> - </form> - <br> - </td> - </tr> - </table> - </td> - </tr> - </table> - </td> - </tr> -</table> -</center> -<?php include (BASE.'includes/footer.inc.php'); ?> +// select for languages +$dir_handle = @opendir(BASE.'languages/'); +$tmp_pref_language = urlencode(ucfirst($language)); +while ($file = readdir($dir_handle)) { + if (substr($file, -8) == ".inc.php") { + $language_tmp = urlencode(ucfirst(substr($file, 0, -8))); + if ($language_tmp == $cookie_language) { + $language_select .= "<option value=\"$language_tmp\" selected>$language_tmp</option>\n"; + } else { + $language_select .= "<option value=\"$language_tmp\">$language_tmp</option>\n"; + } + } +} +closedir($dir_handle); + +// select for calendars +$calendar_select = display_ical_list(availableCalendars($username, $password, $ALL_CALENDARS_COMBINED)); + +// select for dayview +$view_select = ($cookie_view == 'day') ? '<option value="day" selected>{L_DAY}</option>' : '<option value="day">{L_DAY}</option>'; +$view_select .= ($cookie_view == 'week') ? '<option value="week" selected>{L_WEEK}</option>' : '<option value="week">{L_WEEK}</option>'; +$view_select .= ($cookie_view == 'month') ? '<option value="month" selected>{L_MONTH}</option>' : '<option value="month">{L_MONTH}</option>'; + +// select for time +for ($i = 000; $i <= 1200; $i += 100) { + $s = sprintf("%04d", $i); + $time_select .= "<option value=\"$s\""; + if ($s == $cookie_time) { + $time_select .= " selected"; + } + $time_select .= ">$s</option>\n"; +} +// select for day of week +$i=0; +foreach ($daysofweek_lang as $daysofweek) { + if ($startdays[$i] == "$cookie_startday") { + $startday_select .= "<option value=\"$startdays[$i]\" selected>$daysofweek</option>\n"; + } else { + $startday_select .= "<option value=\"$startdays[$i]\">$daysofweek</option>\n"; + } + $i++; +} + +$dir_handle = @opendir(BASE.'templates/'); +while ($file = readdir($dir_handle)) { + if (($file != ".") && ($file != "..") && ($file != "CVS")) { + if (!is_file($file)) { + $file_disp = ucfirst($file); + $style_select .= ($file == "$cookie_style") ? "<option value=\"$file\" selected>$file_disp</option>\n" : "<option value=\"$file\">$file_disp</option>\n"; + } + } +} +closedir($dir_handle); + +$page = new Page(BASE.'templates/'.$template.'/preferences.tpl'); + +$page->replace_tags(array( + 'header' => BASE.'templates/'.$template.'/header.tpl', + 'footer' => BASE.'templates/'.$template.'/footer.tpl', + 'template' => $template, + 'cal' => $cal, + 'getdate' => $getdate, + 'calendar_name' => $calendar_name, + 'display_date' => $display_date, + 'rss_powered' => $rss_powered, + 'rss_available' => '', + 'rss_valid' => '', + 'todo_available' => '', + 'language_select' => $language_select, + 'calendar_select' => $calendar_select, + 'view_select' => $view_select, + 'time_select' => $time_select, + 'startday_select' => $startday_select, + 'style_select' => $style_select, + 'message' => $message + + )); + +$page->replace_langs($lang); + +$page->output(); + +?> diff --git a/templates/default/event.tpl b/templates/default/event.tpl index b1ea933..7b16003 100644 --- a/templates/default/event.tpl +++ b/templates/default/event.tpl @@ -15,22 +15,22 @@ <tr> <td align="left" class="V12"> <div style="margin-left: 10px; margin-bottom:10px;"> - <p>{EVENT} - <span class="V9">(<i>{EVENT_TIMES}</i>)</font></p> + <p>{EVENT} - <span class="V9">(<i>{EVENT_TIMES}</i>)</span></p> <!-- switch description on --> <p>{DESCRIPTION}</p> <!-- switch description off --> <p> <!-- switch organizer on --> - <b>{ORGANIZER_LANG}</b>: {ORGANIZER}<br> + <b>{L_ORGANIZER}</b>: {ORGANIZER}<br> <!-- switch organizer off --> <!-- switch attendee on --> - <b>{ATTENDEE_LANG}</b>: {ATTENDEE}<br> + <b>{L_ATTENDEE}</b>: {ATTENDEE}<br> <!-- switch attendee off --> <!-- switch status on --> - <b>{STATUS_LANG}</b>: {STATUS}<br> + <b>{L_STATUS}</b>: {STATUS}<br> <!-- switch status off --> <!-- switch location on --> - <b>{LOCATION_LANG}</b>: {LOCATION}<br> + <b>{L_LOCATION}</b>: {LOCATION}<br> <!-- switch location off --> </p> </div> diff --git a/templates/default/footer.tpl b/templates/default/footer.tpl index 9fcaf1f..4f04038 100644 --- a/templates/default/footer.tpl +++ b/templates/default/footer.tpl @@ -1,13 +1,13 @@ -<center class="V9"><br />{POWERED_BY_LANG} <a class="psf" href="http://phpicalendar.sourceforge.net/nuke/">PHP iCalendar 2.0</a> -<!-- Switch RSS Valid On --> +<center class="V9"><br />{POWERED_BY_LANG} <a class="psf" href="http://phpicalendar.sourceforge.net/nuke/">PHP iCalendar 2.0</a><br> +<!-- switch rss_valid on --> <p> <a style="color:gray" href="http://feeds.archive.org/validator/check?url={FOOTER_CHECK}"> <img src="{BASE}images/valid-rss.png" alt="[Valid RSS]" title="Validate my RSS feed" width="88" height="31" border="1" vspace="3" /></a> </p> -<!-- Switch RSS Valid Off --> -<!-- Switch RSS On --> -{THIS_SITE_IS_LANG} <a class="psf" href="{BASE}rss/index.php?cal={CAL}&getdate={GETDATE}">RSS-Enabled</a>'; -<!-- Switch RSS Valid On --> +<!-- switch rss_valid off --> +<!-- switch rss_powered on --> +{THIS_SITE_IS_LANG} <a class="psf" href="{BASE}rss/index.php?cal={CAL}&getdate={GETDATE}">RSS-Enabled</a> +<!-- switch rss_powered off --> </center> </body> </html> diff --git a/templates/default/header.tpl b/templates/default/header.tpl index cc1ef9f..7707874 100644 --- a/templates/default/header.tpl +++ b/templates/default/header.tpl @@ -4,10 +4,12 @@ <head> <meta http-equiv="content-type" content="text/html;charset=UTF-8"> <title>{CALENDAR_NAME} - {DISPLAY_DATE}</title> - <link rel="stylesheet" type="text/css" href="{BASE}styles/{STYLE_SHEET}/default.css"> - <!-- Switch RSS On --> + <link rel="stylesheet" type="text/css" href="templates/{TEMPLATE}/default.css"> + <!-- switch rss_available on --> <link rel="alternate" type="application/rss+xml" title="RSS" href="{DEFAULT_VIEW}/rss/rss.php?cal={CAL}&rssview={CURRENT_VIEW}"> - <!-- Switch RSS Off --> + <!-- switch rss_available off --> + <!-- switch todo_available on --> {TODO_JS} + <!-- switch todo_available off --> </head> <body>
\ No newline at end of file diff --git a/templates/default/preferences.tpl b/templates/default/preferences.tpl index 621fdcc..5d9c2c6 100644 --- a/templates/default/preferences.tpl +++ b/templates/default/preferences.tpl @@ -1,3 +1,4 @@ +{HEADER} <center> <table border="0" width="700" cellspacing="0" cellpadding="0"> <tr> @@ -11,7 +12,7 @@ <td class="navback"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> - <td align="center" class="navback" nowrap valign="middle"><font class="H20">{PREFERENCES_LANG}</font></td> + <td align="center" class="navback" nowrap valign="middle"><font class="H20">{L_PREFERENCES}</font></td> </tr> </table> </td> @@ -46,38 +47,38 @@ <form action="preferences.php?action=setcookie" METHOD="post"> <table border="0" width="620" cellspacing="2" cellpadding="2" align="center"> <tr> - <td align="left" valign="top" width="300" nowrap>{SELECT_LANG_LANG}</td> + <td align="left" valign="top" width="300" nowrap>{L_SELECT_LANG}</td> <td align="left" valign="top" width="20"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"><select name="cookie_language" class="query_style">{COOKIE_LANGUAGE}</select></td> + <td align="left" valign="top"><select name="cookie_language" class="query_style">{LANGUAGE_SELECT}</select></td> </tr> <tr> - <td align="left" valign="top" width="300" nowrap>{SELECT_CAL_LANG}</td> + <td align="left" valign="top" width="300" nowrap>{L_SELECT_CAL}</td> <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"><select name="cookie_calendar" class="query_style">{COOKIE_CALENDAR}</select></td> + <td align="left" valign="top"><select name="cookie_calendar" class="query_style">{CALENDAR_SELECT}</select></td> </tr> <tr> - <td align="left" valign="top" width="300" nowrap>{SELECT_VIEW_LANG}</td> + <td align="left" valign="top" width="300" nowrap>{L_SELECT_VIEW}</td> <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"><select name="cookie_view" class="query_style">{COOKIE_VIEW}</select></td> + <td align="left" valign="top"><select name="cookie_view" class="query_style">{VIEW_SELECT}</select></td> </tr> <tr> - <td align="left" valign="top" width="300" nowrap>{SELECT_TIME_LANG}</td> + <td align="left" valign="top" width="300" nowrap>{L_SELECT_TIME}</td> <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"><select name="cookie_time" class="query_style">{COOKIE_TIME}</select></td> + <td align="left" valign="top"><select name="cookie_time" class="query_style">{TIME_SELECT}</select></td> </tr> <tr> - <td align="left" valign="top" width="300" nowrap>{SELECT_DAY_LANG}</td> + <td align="left" valign="top" width="300" nowrap>{L_SELECT_DAY}</td> <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"><select name="cookie_startday" class="query_style">{COOKIE_STARTDAY}</select></td> + <td align="left" valign="top"><select name="cookie_startday" class="query_style">{STARTDAY_SELECT}</select></td> </tr> <tr> - <td align="left" valign="top" width="300" nowrap>{SELECT_STYLE_LANG}</td> + <td align="left" valign="top" width="300" nowrap>{L_SELECT_STYLE}</td> <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"><select name="cookie_style" class="query_style">{COOKIE_STYLE}</select></td> + <td align="left" valign="top"><select name="cookie_style" class="query_style">{STYLE_SELECT}</select></td> </tr> <!-- switch cookie_already_set on --> <tr> - <td align="left" valign="top" nowrap>{UNSET_PREFS_LANG}</td> + <td align="left" valign="top" nowrap>{L_UNSET_PREFS}</td> <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> <td align="left" valign="top"><INPUT TYPE="checkbox" NAME="unset" VALUE="true"></td> </tr> @@ -86,7 +87,7 @@ <tr> <td align="left" valign="top" nowrap> </td> <td align="left" valign="top"><img src="images/spacer.gif" alt=" " width="20" height="1" border="0"></td> - <td align="left" valign="top"><input type="submit" name="set" value="{SET_PREFS_LANG}"></button></td> + <td align="left" valign="top"><input type="submit" name="set" value="{L_SET_PREFS}"></button></td> </tr> <!-- switch cookie_not_set off --> </table> @@ -101,4 +102,5 @@ </td> </tr> </table> -</center>
\ No newline at end of file +</center> +{FOOTER}
\ No newline at end of file diff --git a/templates/default/todo.tpl b/templates/default/todo.tpl index 71c1ed7..5527a1e 100644 --- a/templates/default/todo.tpl +++ b/templates/default/todo.tpl @@ -21,16 +21,16 @@ <!-- switch description off --> <p> <!-- switch status on --> - <b>{STATUS_LANG}</b>: {STATUS}<br> + <b>{L_STATUS}</b>: {STATUS}<br> <!-- switch status off --> <!-- switch priority on --> - <b>{PRIORITY_LANG}</b>: {PRIORITY}<br> + <b>{L_PRIORITY}</b>: {PRIORITY}<br> <!-- switch priority off --> <!-- switch start_date on --> - <b>{CREATED_LANG}</b>: {START_DATE}<br> + <b>{L_CREATED}</b>: {START_DATE}<br> <!-- switch start_date off --> <!-- switch due_date on --> - <b>{DUE_LANG}</b>: {DUE_DATE}<br> + <b>{L_DUE}</b>: {DUE_DATE}<br> <!-- switch due_date off --> </p> </div> |