cvs: php-news-web / group.php index.php /i udm.gif
| From: | Mark Kronsbein | Date: | Mon, 19 Aug 2002 18:00:41 +0000 |
| Subject: | cvs: php-news-web / group.php index.php /i udm.gif | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-12043@lists.php.net to get a copy of this message | ||
mk Mon Aug 19 14:00:41 2002 EDT
Modified files:
/php-news-web group.php index.php
/php-news-web/i udm.gif
Log:
Added RDF functionallity
Index: php-news-web/group.php
diff -u php-news-web/group.php:1.10 php-news-web/group.php:1.11
--- php-news-web/group.php:1.10 Tue Jul 2 20:00:55 2002
+++ php-news-web/group.php Mon Aug 19 14:00:40 2002
@@ -25,6 +25,21 @@
<link>http://news.php.net/group.php?group=<?echo
$group?></link>
<description></description>
<? break;
+ case 'rdf':
+ header("Content-type: text/xml");
+ echo '<?xml version="1.0" encoding="iso-8859-1"?>';
+?>
+<rdf:RDF
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns="http://my.netscape.com/rdf/simple/0.9/">
+<channel>
+ <title>news.php.net: <?echo $group?></title>
+ <link>http://news.php.net/group.php?group=<?echo
$group?></link>
+ <description><?echo $group?> Mailinglist at news.php.net</description>
+ <language>en-US</language>
+</channel>
+<?
+break;
case 'html':
default:
head($group);
@@ -53,6 +68,14 @@
echo "<pubDate>$date822</pubDate>";
echo "</item>\n";
break;
+ case 'rdf':
+ echo "<item>\n";
+ echo "<title>", format_subject($subj), "</title>\n";
+ echo "<link>http://news.php.net/article.php?group=$group&article=$n</link>\n";
+ echo "<description>", htmlspecialchars(format_author($author)),
"</description>\n";
+ echo "<pubDate>$date822</pubDate>";
+ echo "</item>\n";
+ break;
case 'html':
default:
echo "<tr>";
@@ -70,6 +93,9 @@
switch ($format) {
case 'rss':
echo "</channel></rss>\n";
+ break;
+ case 'rdf':
+ echo "</rdf:RDF>\n";
break;
case 'html':
default:
Index: php-news-web/index.php
diff -u php-news-web/index.php:1.3 php-news-web/index.php:1.4
--- php-news-web/index.php:1.3 Sat Jul 7 22:53:05 2001
+++ php-news-web/index.php Mon Aug 19 14:00:40 2002
@@ -13,7 +13,7 @@
echo '<table border="0" cellpadding="6"
cellspacing="0"><tr><td>';
echo "<table class=\"grouplist\">\n";
-echo '<tr><td class="grouplisthead">name</td><td
class="grouplisthead">messages</td><td
class="grouplisthead">rss</td></tr>',"\n";
+echo '<tr><td class="grouplisthead">name</td><td
class="grouplisthead">messages</td><td
class="grouplisthead">rss</td><td
class="grouplisthead">rdf</td></tr>',"\n";
$class = "even";
while ($line = fgets($s, 1024)) {
if ($line == ".\r\n") break;
@@ -27,6 +27,11 @@
echo "<td class=\"$class\">";
if ($active != 'n') {
echo "<a
href=\"group.php?group=$group&format=rss\">rss</a>";
+ }
+ echo "</td>\n";
+ echo "<td class=\"$class\">";
+ if ($active != 'n') {
+ echo "<a
href=\"group.php?group=$group&format=rdf\">rdf</a>";
}
echo "</td>\n";
echo "</tr>\n";
Index: php-news-web/i/udm.gif