mirror of
https://github.com/scummvm/scummvm-web.git
synced 2026-06-20 05:45:49 +00:00
* For each news item there is now a dedicate page showing just that item * The title bar of each news items links to its dedicated page * The Atom and RSS feeds make use of this new item specific URL * The Atom feed now has the scummvm front page as an alternate link svn path=/web/trunk/; revision=24983
41 lines
1.5 KiB
PHP
41 lines
1.5 KiB
PHP
<?php
|
|
$file_root = ".";
|
|
|
|
// load specific libraries
|
|
require($file_root."/include/"."util.php");
|
|
require($file_root."/include/"."news.php");
|
|
|
|
header("Content-Type: text/xml; charset=UTF-8");
|
|
echo "<?xml version='1.0' encoding='UTF-8' ?>\n";
|
|
?>
|
|
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
<channel>
|
|
<title>ScummVM news</title>
|
|
<link>http://www.scummvm.org/</link>
|
|
<description>ScummVM is a cross-platform interpreter for several point-and-click adventure engines. This includes all SCUMM-based adventures by LucasArts, Simon the Sorcerer 1&2 by AdventureSoft, Beneath a Steel Sky and Broken Sword 1&2 by Revolution, and many more.</description>
|
|
<language>en</language>
|
|
|
|
<?php
|
|
|
|
// Fetch news (only show the first 5 records)
|
|
$news = list_latest_news(5);
|
|
|
|
// Display news items
|
|
while (list($key,$item) = each($news)) {
|
|
$news_url = "http://www.scummvm.org/?shownews=archive#".date("Y-m-d",$item["date"]);
|
|
$news_url2 = "http://www.scummvm.org/?shownews=".$item["filename"];
|
|
echo "\t\t<item>\n";
|
|
echo "\t\t\t<title>".$item["title"]."</title>\n";
|
|
echo "\t\t\t<description><![CDATA[\n".$item["body"]."\n\t\t\t]]></description>\n";
|
|
echo "\t\t\t<pubDate>".date("r",$item["date"])."</pubDate>\n";
|
|
if ($item["author"] != "")
|
|
echo "\t\t\t<author>nospam@scummvm.org (".$item["author"].")</author>\n";
|
|
echo "\t\t\t<guid isPermaLink='true'>".$news_url."</guid>\n";
|
|
echo "\t\t\t<link>".$news_url2."</link>\n";
|
|
echo "\t\t</item>\n";
|
|
} // end of news loop
|
|
?>
|
|
|
|
</channel>
|
|
</rss>
|