diff options
author | deva <deva> | 2010-01-28 16:17:56 +0000 |
---|---|---|
committer | deva <deva> | 2010-01-28 16:17:56 +0000 |
commit | 521796a29642d27de7b998a8e3442085044a1fa5 (patch) | |
tree | 114e2b8540af98e5424aac18a9d0af05f52185d0 /utils/rss.php | |
parent | 135d5257dc3351291a66bdf697c840d516995cd5 (diff) |
Make RSS fedd generator configurable through config.php
Diffstat (limited to 'utils/rss.php')
-rw-r--r-- | utils/rss.php | 21 |
1 files 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, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); fwrite($fp, "<rss version=\"2.0\">\n"); fwrite($fp, " <channel>\n"); - fwrite($fp, " <title>DIE News</title>\n"); - fwrite($fp, " <link>http://www.executionroom.com</link>\n"); - fwrite($fp, " <description>DIE - News from ExecutionRoom.com</description>\n"); + fwrite($fp, " <title>".$RSS_TITLE."</title>\n"); + fwrite($fp, " <link>".$RSS_URL."</link>\n"); + fwrite($fp, " <description>".$RSS_DESCRIPTION."</description>\n"); fwrite($fp, " <language>en-us</language>\n"); fwrite($fp, " <pubDate>".$this->date(time())."</pubDate>\n"); fwrite($fp, " <lastBuildDate>".$this->date(time())."</lastBuildDate>\n"); fwrite($fp, " <docs>http://blogs.law.harvard.edu/tech/rss</docs>\n"); fwrite($fp, " <generator>ExecutionRoom CMS</generator>\n"); - fwrite($fp, " <managingEditor>info@executionroom.com</managingEditor>\n"); - fwrite($fp, " <webMaster>info@executionroom.com</webMaster>\n"); + fwrite($fp, " <managingEditor>".$RSS_EDITOR."</managingEditor>\n"); + fwrite($fp, " <webMaster>".$RSS_WEBMASTER."</webMaster>\n"); $i = 0; foreach($this->news as $newsentry) { fwrite($fp, " <item>\n"); fwrite($fp, " <title>".$newsentry->title."</title>\n"); - fwrite($fp, " <link>http://www.executionroom.com/?page=news&id=".$newsentry->time."</link>\n"); + fwrite($fp, " <link>".$RSS_URL."/?page=".$RSS_TARGET_PAGE."&newsid=".$newsentry->time."</link>\n"); fwrite($fp, " <description>".$newsentry->description."</description>\n"); fwrite($fp, " <pubDate>".$this->date($newsentry->time)."</pubDate>\n"); - fwrite($fp, " <guid>http://www.executionroom.com/?page=news&id=".$newsentry->time."&newsid="+$newsentry->time+"</guid>\n"); + fwrite($fp, " <guid>".$RSS_URL."/?page=".$RSS_TARGET_PAGE."&newsid=".$newsentry->time."</guid>\n"); fwrite($fp, " </item>\n"); $i++; if($i > 6) break; |