From cb7f301d3a39acebecd56fa8d831e275bc8980f0 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 9 Feb 2004 00:51:48 +0000 Subject: Initial wiring of rss index and template. --- admin.php | 1 + day.php | 1 + languages/english.inc.php | 19 +++--- month.php | 1 + preferences.php | 1 + print.php | 1 + rss/index.php | 137 +++++++++++++++------------------------- search.php | 1 + templates/default/header.tpl | 2 +- templates/default/rss_index.tpl | 60 ++++++++++++++++++ week.php | 1 + year.php | 4 +- 12 files changed, 132 insertions(+), 97 deletions(-) create mode 100644 templates/default/rss_index.tpl diff --git a/admin.php b/admin.php index 1faad28..ae07f18 100644 --- a/admin.php +++ b/admin.php @@ -51,6 +51,7 @@ $page->replace_tags(array( 'footer' => BASE.'templates/'.$template.'/footer.tpl', 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', 'event_js' => BASE.'functions/event.js', + 'default_path' => '', 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, diff --git a/day.php b/day.php index 31e1d1c..bfa8d4b 100644 --- a/day.php +++ b/day.php @@ -40,6 +40,7 @@ $page->replace_tags(array( 'footer' => BASE.'templates/'.$template.'/footer.tpl', 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', 'event_js' => BASE.'functions/event.js', + 'default_path' => '', 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, diff --git a/languages/english.inc.php b/languages/english.inc.php index 6a41ce3..7db4f98 100644 --- a/languages/english.inc.php +++ b/languages/english.inc.php @@ -113,21 +113,24 @@ $lang['l_delete_success'] = 'was deleted successfully.'; $lang['l_action_success'] = 'Your action was successful.'; $lang['l_submit'] = 'Submit'; $lang['l_delete'] = 'Delete'; -$all_cal_comb_lang = 'All calendars combined'; +$all_cal_comb_lang = 'All Combined'; // New for 2.0 $lang['l_legend'] = 'Legend'; $lang['l_admin_subhead'] = 'Manage your calendars from this page'; $lang['l_prefs_subhead'] = 'Sets a cookie for visiting this site'; +$lang['l_rss_info'] = 'RSS Information'; +$lang['l_rss_subhead'] = 'Basic RSS feeds available for each calendar'; +$lang['l_rss_notenabled'] = 'RSS is not enabled on this site'; // - navigation -$back_lang = 'Back'; -$next_lang = 'Next'; -$prev_lang = 'Prev'; -$day_view_lang = 'Day View'; -$week_view_lang = 'Week View'; -$month_view_lang = 'Month View'; -$year_view_lang = 'Year View'; +$lang['l_back'] = 'Back'; +$lang['l_next'] = 'Next'; +$lang['l_prev'] = 'Prev'; +$lang['l_day_view'] = 'Day View'; +$lang['l_week_view'] = 'Week View'; +$lang['l_month_view'] = 'Month View'; +$lang['l_year_view'] = 'Year View'; // --------------------------------- diff --git a/month.php b/month.php index c04781d..017b5a1 100644 --- a/month.php +++ b/month.php @@ -60,6 +60,7 @@ $page->replace_tags(array( 'calendar_name' => $calendar_name, 'display_date' => $display_date, 'rss_powered' => $rss_powered, + 'default_path' => '', 'rss_available' => '', 'rss_valid' => '', 'todo_js' => '', diff --git a/preferences.php b/preferences.php index cb5254c..aed1b9b 100644 --- a/preferences.php +++ b/preferences.php @@ -136,6 +136,7 @@ $page->replace_tags(array( 'header' => BASE.'templates/'.$template.'/header.tpl', 'footer' => BASE.'templates/'.$template.'/footer.tpl', 'template' => $template, + 'default_path' => '', 'cal' => $cal, 'getdate' => $getdate, 'calendar_name' => $calendar_name, diff --git a/print.php b/print.php index f08c89e..16124bb 100644 --- a/print.php +++ b/print.php @@ -56,6 +56,7 @@ $page->replace_tags(array( 'footer' => BASE.'templates/'.$template.'/footer.tpl', 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', 'event_js' => BASE.'functions/event.js', + 'default_path' => '', 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, diff --git a/rss/index.php b/rss/index.php index 3163702..fca8327 100644 --- a/rss/index.php +++ b/rss/index.php @@ -1,93 +1,56 @@ -
- - - - -
- - - - - - - - - - - - - - - - -
- - - - - - -
-
- - - - - -
-
- RSS 0.91 enabled.
-
- tags - $filelist = availableCalendarNames($username, $password, $ALL_CALENDARS_COMBINED); - foreach ($filelist as $file) { - // $cal_filename is the filename of the calendar without .ics - // $cal is a urlencoded version of $cal_filename - // $cal_displayname is $cal_filename with occurrences of "32" replaced with " " - $cal_filename_tmp = substr($file,0,-4); - $cal_tmp = urlencode($cal_filename_tmp); - $cal_displayname_tmp = str_replace("32", " ", $cal_filename_tmp); - echo ''.$cal_displayname_tmp.' '. $calendar_lang.'
'; - echo $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=day
'; - echo $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=week
'; - echo $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=month
'; - $footer_check = $default_path.'/rss/rss.php?cal='.$default_cal.'&rssview='.$default_view; - echo '

'; - } - ?> -
-
-
-
- + +$filelist = availableCalendarNames($username, $password, $ALL_CALENDARS_COMBINED); +foreach ($filelist as $file) { + // $cal_filename is the filename of the calendar without .ics + // $cal is a urlencoded version of $cal_filename + // $cal_displayname is $cal_filename with occurrences of "32" replaced with " " + $cal_filename_tmp = substr($file,0,-4); + $cal_tmp = urlencode($cal_filename_tmp); + $cal_displayname_tmp = str_replace("32", " ", $cal_filename_tmp); + $rss_list = ''.$cal_displayname_tmp.' '. $calendar_lang.'
'; + $rss_list .= $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=day
'; + $rss_list .= $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=week
'; + $rss_list .= $default_path.'/rss/rss.php?cal='.$cal_tmp.'&rssview=month
'; + $footer_check = $default_path.'/rss/rss.php?cal='.$default_cal.'&rssview='.$default_view; +} + + +$page = new Page(BASE.'templates/'.$template.'/rss_index.tpl'); + +$page->replace_tags(array( + 'header' => BASE.'templates/'.$template.'/header.tpl', + 'footer' => BASE.'templates/'.$template.'/footer.tpl', + 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', + 'event_js' => BASE.'functions/event.js', + 'default_path' => $default_path, + 'template' => $template, + 'cal' => $cal, + 'getdate' => $getdate, + 'calendar_name' => $calendar_name, + 'display_date' => $display_date, + 'current_view' => $current_view, + 'sidebar_date' => $sidebar_date, + 'rss_powered' => $rss_powered, + 'rss_list' => $rss_list, + 'rss_available' => '', + 'rssdisable' => '', + 'rss_valid' => '', + 'todo_js' => '', + 'show_search' => '' + )); + +$page->output(); + + +?> + \ No newline at end of file diff --git a/search.php b/search.php index 89d4f1b..69dbf58 100644 --- a/search.php +++ b/search.php @@ -276,6 +276,7 @@ $page->replace_tags(array( 'footer' => BASE.'templates/'.$template.'/footer.tpl', 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', 'event_js' => BASE.'functions/event.js', + 'default_path' => '', 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, diff --git a/templates/default/header.tpl b/templates/default/header.tpl index 9ecc5fc..fefa494 100644 --- a/templates/default/header.tpl +++ b/templates/default/header.tpl @@ -4,7 +4,7 @@ {CALENDAR_NAME} - {DISPLAY_DATE} - + diff --git a/templates/default/rss_index.tpl b/templates/default/rss_index.tpl new file mode 100644 index 0000000..25df995 --- /dev/null +++ b/templates/default/rss_index.tpl @@ -0,0 +1,60 @@ +{HEADER} +
+ + + + +
+ + + + + + + + + + +
+ + + + + +
+
+ + + + + +
+
+ {L_THIS_SITE_IS} RSS 0.91 enabled.
+
+ {RSS_LIST} +
+
+
+
+ + + + + + +
+
+ +{FOOTER} \ No newline at end of file diff --git a/week.php b/week.php index a9c42f9..1bf410d 100644 --- a/week.php +++ b/week.php @@ -43,6 +43,7 @@ $page->replace_tags(array( 'footer' => BASE.'templates/'.$template.'/footer.tpl', 'sidebar' => BASE.'templates/'.$template.'/sidebar.tpl', 'event_js' => BASE.'functions/event.js', + 'default_path' => '', 'template' => $template, 'cal' => $cal, 'getdate' => $getdate, diff --git a/year.php b/year.php index e1bf66d..1c5ed2c 100644 --- a/year.php +++ b/year.php @@ -1,7 +1,7 @@ replace_tags(array( 'header' => BASE.'templates/'.$template.'/header.tpl', 'footer' => BASE.'templates/'.$template.'/footer.tpl', 'template' => $template, + 'default_path' => '', 'cal' => $cal, 'getdate' => $getdate, 'calendar_name' => $calendar_name, 'display_date' => $this_year, + 'default_path' => '', 'rss_powered' => $rss_powered, 'rss_available' => '', 'rss_valid' => '', -- cgit v1.2.3