Update of /cvsroot/phpicalendar/phpicalendar/rss
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26562/phpicalendar/rss
Modified Files:
rss.php
Log Message:
add year printview, fix misc bugs
Index: rss.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/rss/rss.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** rss.php 15 Feb 2006 15:56:56 -0000 1.38
--- rss.php 21 Mar 2006 09:52:30 -0000 1.39
***************
*** 16,19 ****
--- 16,22 ----
define('BASE', '../');
include(BASE.'functions/init.inc.php');
+ if ($enable_rss != 'yes') {
+ die ("RSS feeds are not enabled on this site.");
+ }
include_once(BASE.'functions/date_functions.php');
***************
*** 84,117 ****
$getdate = $todate;
#echo "from:$fromdate to:$todate";
- include(BASE.'functions/ical_parser.php');
- if ($enable_rss != 'yes') {
- die ("RSS feeds are not enabled on this site.");
- }
-
- //Set calendar or calendar directory name for feed
- //Note that this depends on other modifications I've made to
- //allow phpicalendar to use calendar subdirectories - see bbs
! $cal_displayname = urldecode($cal);
! if ($cal == $ALL_CALENDARS_COMBINED) {
! $temp = explode("/",$calendar_path);
! $cal_displayname = str_replace("32"," ",ucfirst(array_pop($temp)));
! }
$events_count = 0;
// calculate a value for Last Modified and ETag
! $filemod = time(); #default to now in case filemtime can't find the mod date
! $cal = str_replace("+"," ",$cal);
! $calendar_path = str_replace("+"," ",$calendar_path);
! $filemod = time(); #default to now in case filemtime can't find the mod date
! $cal = str_replace("+"," ",$cal);
! $calendar_path = str_replace("+"," ",$calendar_path);
! if ($cal == $ALL_CALENDARS_COMBINED) {
! $filemod = filemtime("$calendar_path");
! }else{
! if (is_file("$calendar_path/$cal.ics")){
! $filemod = filemtime("$calendar_path/$cal.ics");
! }
}
$filemodtime = date("r", $filemod);
--- 87,103 ----
$getdate = $todate;
#echo "from:$fromdate to:$todate";
! #Note that ical_parser supplies cal_displayname.
! include(BASE.'functions/ical_parser.php');
$events_count = 0;
// calculate a value for Last Modified and ETag
! $cal = implode(",",$cals);
!
! //get filemtime from master array
! $filemod = 0; #default to start of unix era, overwrite with most recent mtime from master array
! foreach ($master_array['-4'] as $calinfo){
! if ($calinfo['mtime'] > $filemod) $filemod = $calinfo['mtime'];
}
$filemodtime = date("r", $filemod);
***************
*** 138,142 ****
if ($theview !=""){$rss .= ' - '.$theview;}
$rss .= "</title>\n";
! $rss .= '<link>'.htmlspecialchars ("$default_path").'</link>'."\n";
$rss .= '<description>'.$cal_displayname.' '.$lang['l_calendar'].' - '.$theview.'</description>'."\n";
$rss .= '<language>'.$language.'</language>'."\n";
--- 124,134 ----
if ($theview !=""){$rss .= ' - '.$theview;}
$rss .= "</title>\n";
!
! $views = array('day','week','month','year');
! if (in_array($rssview, $views)) $default_path .= "/$rssview.php";
! $rss_link = $default_path."/";
! if (isset($cpath) && $cpath !='') $rss_link.="?cpath=$cpath";
! $rss .= "<link>$rss_link</link>\n";
!
$rss .= '<description>'.$cal_displayname.' '.$lang['l_calendar'].' - '.$theview.'</description>'."\n";
$rss .= '<language>'.$language.'</language>'."\n";
***************
*** 184,188 ****
$rss_title = urldecode ("$dayofweek: $event_text");
! $rss_link = htmlspecialchars ("$default_path/day.php?getdate=$thisdate&cal=$cal&cpath=$cpath");
$rss_description = htmlspecialchars ("$dayofweek $event_start: $description");
--- 176,181 ----
$rss_title = urldecode ("$dayofweek: $event_text");
! $rss_link = "$default_path/day.php?getdate=$thisdate&cal=$cal";
! if (isset($cpath) && $cpath !='') $rss_link.="&cpath=$cpath";
$rss_description = htmlspecialchars ("$dayofweek $event_start: $description");
|