Update of /cvsroot/phpicalendar/phpicalendar/rss
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21734/phpicalendar/rss
Modified Files:
rss.php
Log Message:
update rss.php and README
Index: rss.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/rss/rss.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** rss.php 24 Mar 2006 01:29:23 -0000 1.40
--- rss.php 5 Apr 2006 04:48:02 -0000 1.41
***************
*** 13,18 ****
* feeds can be specified for a range of dates
*
- * Language encoding added by dyfrin 2006/03/08 19:09:28
*********************************************************************************/
define('BASE', '../');
require(BASE.'functions/init.inc.php');
--- 13,26 ----
* feeds can be specified for a range of dates
*
*********************************************************************************/
+
+ /* Modified from 2.21 by dyfrin 2006/03/08 19:09:28
+ Changes:
+ -RSS changed to 2.0, encoding removed, languages converted to ISO standard for feeds
+ -RSS title changed to be set by config.inc.php. Make sure that is added to it.
+ Lines modified: 135-165, 208-223
+ Additional mods by J. Hu
+ */
+
define('BASE', '../');
require(BASE.'functions/init.inc.php');
***************
*** 112,117 ****
// stuff, if so be nice and send back a 304 and exit.
! if ( ($_SERVER['HTTP_IF_MODIFIED_SINCE'] == $filemodtime) || ($_SERVER['HTTP_IF_NONE_MATCH'] == $filemodtime))
! {
header ("HTTP/1.1 304 Not Modified");
exit;
--- 120,124 ----
// stuff, if so be nice and send back a 304 and exit.
! if ( ($_SERVER['HTTP_IF_MODIFIED_SINCE'] == $filemodtime) || ($_SERVER['HTTP_IF_NONE_MATCH'] == $filemodtime)){
header ("HTTP/1.1 304 Not Modified");
exit;
***************
*** 124,139 ****
/* End language modification */
- //If client needs new feed - make the header
$rss = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"."\n";
! $rss .= '<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">'."\n";
! $rss .= '<rss version="0.91">'."\n";
! $rss .= '<channel>'."\n";
$rss .= '<title>'.$cal_displayname;
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";
--- 131,152 ----
/* End language modification */
$rss = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"."\n";
!
! /* Use 1.0 and strip encoding, use rss_language */
! $rss .= '<rdf:RDF
! xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
! xmlns:ev="http://purl.org/rss/1.0/modules/event/"
! xmlns:dc="http://purl.org/dc/elements/1.1/"
! xmlns="http://purl.org/rss/1.0/">'."\n";
!
! $rss .= '<channel rdf:about="'.$default_path.'/rss/rss.php/';
! if (isset($cpath) && $cpath !='') $rss_link.="?cpath=$cpath";
! $rss .='">'."\n";
!
$rss .= '<title>'.$cal_displayname;
if ($theview !=""){$rss .= ' - '.$theview;}
$rss .= "</title>\n";
! $rss .= '<link>'.htmlspecialchars("$default_path").'</link>'."\n";
if (isset($cpath) && $cpath !='') $rss_link.="?cpath=$cpath";
$rss .= "<link>$rss_link</link>\n";
|