From ff205ce74d9950105e9c4c9745462f433f81afa6 Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Mon, 29 Dec 2008 06:00:42 +0000 Subject: add all calendars to rss index --- rss/index.php | 40 ++++++++++++++++++---------------------- rss/rss.php | 4 ++-- rss/rss_common.php | 5 +++++ 3 files changed, 25 insertions(+), 24 deletions(-) (limited to 'rss') diff --git a/rss/index.php b/rss/index.php index 7f0168d..911f308 100644 --- a/rss/index.php +++ b/rss/index.php @@ -1,9 +1,9 @@ enable_rss != 'yes') { @@ -18,40 +18,36 @@ if (empty($default_path)) { } } -$current_view = "rssindex"; +$current_view = "rss_index"; $display_date = "RSS Info"; -$rss_list = "\n"; +$rss_list = "
\n"; $xml_icon ="rss icon"; - -$filelist = availableCalendars($username, $password, $phpiCal_config->ALL_CALENDARS_COMBINED); -foreach ($filelist as $file) { +$cals[] = ''; +$cal_displaynames[] = $all_cal_comb_lang; +foreach ($cals as $k=>$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 " " - - if (is_numeric(array_search($file, $cal_filelist))){ - $cal_displayname_tmp = $cal_displaynames[array_search($file,$cal_filelist)]; - }else{ - $cal_displayname_tmp = str_replace("32", " ", str_replace(".ics",'',basename($file))); - } - $rss_list .= ''; + + $rss_list .= ''; /* Changed to show links without urlencode, but links valid urls */ $rss_list .= ""; - $rss_list .= ''; - $rss_list .= ''; + $rss_list .= ''; + $rss_list .= ''; $rss_list .= ''; $rss_list .= ""; - $rss_list .= ''; - $rss_list .= ''; + $rss_list .= ''; + $rss_list .= ''; $rss_list .= ''; $rss_list .= ""; - $rss_list .= ''; - $rss_list .= ''; - $rss_list .= ''; + $rss_list .= ''; + $rss_list .= ''; + $rss_list .= ' + '; $footer_check = $phpiCal_config->default_path.'/rss/rss.php?cal%3D'.rawurlencode($file.'&cpath='.$cpath.'&rssview='.$phpiCal_config->default_view); $validrss_check = str_replace('%', '%25', $footer_check); @@ -78,7 +74,7 @@ $page->replace_tags(array( 'template' => $phpiCal_config->template, 'cal' => $cal, 'getdate' => $getdate, - 'calendar_name' => $calendar_name, + 'calendar_name' => $cal_displayname, 'display_date' => $display_date, 'current_view' => $current_view, 'sidebar_date' => @$sidebar_date, diff --git a/rss/rss.php b/rss/rss.php index 4100c61..c22f31e 100644 --- a/rss/rss.php +++ b/rss/rss.php @@ -11,7 +11,7 @@ $rss_version = ''."\n"; require(BASE.'rss/rss_common.php'); function rss_top(){ - global $cal_displayname, $theview, $default_path, $cpath, $lang, $rss_link, $rss_language; + global $cal_displayname, $theview, $phpiCal_config, $cpath, $lang, $rss_link, $rss_language; $rss = ""."\n"; $rss .= ''."\n"; $rss .= ''."\n"; @@ -26,7 +26,7 @@ function rss_top(){ $rss .= ''.$cal_displayname.' '.$lang['l_calendar'].' - '.$theview.''."\n"; $rss .= ''.$rss_language.''."\n"; - $rss .= 'Copyright '.date(Y).', '.htmlspecialchars ("$default_path").''."\n"; + $rss .= 'Copyright '.date("Y").', '.htmlspecialchars ("$default_path").''."\n"; return $rss; } diff --git a/rss/rss_common.php b/rss/rss_common.php index 73d704f..0e94b09 100644 --- a/rss/rss_common.php +++ b/rss/rss_common.php @@ -45,6 +45,11 @@ switch ($rssview){ $todate = date("Ymd", strtotime($getdate) + 60*60*24); $theview = $lang['l_day']; break; + case 'today': + $fromdate = date("Ymd"); + $todate = date("Ymd", strtotime('tomorrow')); + $theview = $lang['l_todays'] ; + break; case 'tomorrow': $fromdate = date("Ymd",strtotime('tomorrow')); $todate = date("Ymd", strtotime('tomorrow') + 60*60*24); -- cgit v1.2.3
'.$cal_displayname_tmp.' '. $lang['l_calendar'].'
'.$cal_displaynames[$k].' '. $lang['l_calendar'].'".$lang['l_day']."'.$xml_icon.' RSS 0.91'.$xml_icon.' RSS 1.0'.$xml_icon.' RSS 0.91 '.$xml_icon.' RSS 1.0 '.$xml_icon.' RSS 2.0
".$lang['l_week']."'.$xml_icon.' RSS 0.91'.$xml_icon.' RSS 1.0'.$xml_icon.' RSS 0.91 '.$xml_icon.' RSS 1.0 '.$xml_icon.' RSS 2.0
".$lang['l_month']."'.$xml_icon.' RSS 0.91'.$xml_icon.' RSS 1.0'.$xml_icon.' RSS 2.0
'.$xml_icon.' RSS 0.91 '.$xml_icon.' RSS 1.0 '.$xml_icon.' RSS 2.0