From 521796a29642d27de7b998a8e3442085044a1fa5 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 28 Jan 2010 16:17:56 +0000 Subject: Make RSS fedd generator configurable through config.php --- utils/rss.php | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/utils/rss.php b/utils/rss.php index b4b4b86..f0ea103 100644 --- a/utils/rss.php +++ b/utils/rss.php @@ -46,29 +46,36 @@ class RSS { public function write() { + global $RSS_TITLE; + global $RSS_URL; + global $RSS_DESCRIPTION; + global $RSS_EDITOR; + global $RSS_WEBMASTER; + global $RSS_TARGET_PAGE; + $fp = fopen($this->rssfile, "w"); fwrite($fp, "\n"); fwrite($fp, "\n"); fwrite($fp, " \n"); - fwrite($fp, " DIE News\n"); - fwrite($fp, " http://www.executionroom.com\n"); - fwrite($fp, " DIE - News from ExecutionRoom.com\n"); + fwrite($fp, " ".$RSS_TITLE."\n"); + fwrite($fp, " ".$RSS_URL."\n"); + fwrite($fp, " ".$RSS_DESCRIPTION."\n"); fwrite($fp, " en-us\n"); fwrite($fp, " ".$this->date(time())."\n"); fwrite($fp, " ".$this->date(time())."\n"); fwrite($fp, " http://blogs.law.harvard.edu/tech/rss\n"); fwrite($fp, " ExecutionRoom CMS\n"); - fwrite($fp, " info@executionroom.com\n"); - fwrite($fp, " info@executionroom.com\n"); + fwrite($fp, " ".$RSS_EDITOR."\n"); + fwrite($fp, " ".$RSS_WEBMASTER."\n"); $i = 0; foreach($this->news as $newsentry) { fwrite($fp, " \n"); fwrite($fp, " ".$newsentry->title."\n"); - fwrite($fp, " http://www.executionroom.com/?page=news&id=".$newsentry->time."\n"); + fwrite($fp, " ".$RSS_URL."/?page=".$RSS_TARGET_PAGE."&newsid=".$newsentry->time."\n"); fwrite($fp, " ".$newsentry->description."\n"); fwrite($fp, " ".$this->date($newsentry->time)."\n"); - fwrite($fp, " http://www.executionroom.com/?page=news&id=".$newsentry->time."&newsid="+$newsentry->time+"\n"); + fwrite($fp, " ".$RSS_URL."/?page=".$RSS_TARGET_PAGE."&newsid=".$newsentry->time."\n"); fwrite($fp, " \n"); $i++; if($i > 6) break; -- cgit v1.2.3