From 91f74617b9451ae7b64399d19e88da8f0f828f4e Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Wed, 5 Apr 2006 04:48:01 +0000 Subject: update rss.php and README --- rss/rss.php | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'rss') diff --git a/rss/rss.php b/rss/rss.php index f37d5d9..66db472 100644 --- a/rss/rss.php +++ b/rss/rss.php @@ -12,8 +12,16 @@ * feeds can be specified for a number of days to or from a given date * feeds can be specified for a range of dates * -* Language encoding added by dyfrin 2006/03/08 19:09:28 *********************************************************************************/ + +/* 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'); @@ -111,8 +119,7 @@ header ("ETag:\"$filemodtime\""); // checks the user agents headers to see if they kept track of our // 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)) -{ +if ( ($_SERVER['HTTP_IF_MODIFIED_SINCE'] == $filemodtime) || ($_SERVER['HTTP_IF_NONE_MATCH'] == $filemodtime)){ header ("HTTP/1.1 304 Not Modified"); exit; } @@ -123,18 +130,24 @@ $iso_language = array ("en", "pl", "de", "fr", "nl", "da", "it", "ja", "no", "es $rss_language = str_replace($user_language, $iso_language, $language); /* End language modification */ -//If client needs new feed - make the header $rss = ""."\n"; -$rss .= ''."\n"; -$rss .= ''."\n"; -$rss .= ''."\n"; + +/* Use 1.0 and strip encoding, use rss_language */ +$rss .= ''."\n"; + +$rss .= ''."\n"; if (isset($cpath) && $cpath !='') $rss_link.="?cpath=$cpath"; $rss .= "$rss_link\n"; -- cgit v1.2.3