[m-rev.] diff: add guid and link elements to rss feed
Ian MacLarty
maclarty at csse.unimelb.edu.au
Wed Jul 29 11:48:01 AEST 2009
Estimated hours taken: 1
Branches: main
include/functions.inc:
Add <guid> and <link> elements to rss items. The <link> elements are
required for the items to show up in firefox's "live bookmarks" and
the <guid> elements are recommended by the w3c rss validator (although
they aren't required).
Note the use of the md5 function which requires php version 4 or
greater.
Index: include/functions.inc
===================================================================
RCS file: /home/mercury1/repository/w3/include/functions.inc,v
retrieving revision 1.5
diff -u -r1.5 functions.inc
--- include/functions.inc 12 Feb 2009 00:24:44 -0000 1.5
+++ include/functions.inc 29 Jul 2009 01:29:18 -0000
@@ -25,9 +25,12 @@
$news = htmlspecialchars($news);
echo "<item>\n";
+ echo "<guid>http://www.mercury.csse.unimelb.edu.au/rss.xml#".
+ md5($item.$date)."</guid>\n";
echo "<title>$title</title>\n";
echo "<description>$news</description>\n";
echo "<pubDate>$day $month $year 00:00 +1000</pubDate>\n";
+ echo "<link>http://www.mercury.csse.unimelb.edu.au/</link>\n";
echo "</item>\n";
}
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list