rember kids, this question could have been answered in a single post, with the wonders of SPELLING!
*recent*, like cent, no s.
It is currently Fri May 31, 2024 4:37 am


<?php
echo '<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml-stylesheet type="text/xsl" href="templates/rss.xsl"?>';
?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:annotate="http://purl.org/rss/1.0/modules/annotate/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<channel>
<title>Forum latest</title>
<link>http://interlopers.net/forum/</link>
<description>All the latest forum messages</description>
<managingEditor>webmaster@interlopers.net</managingEditor>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>RSS Feed 2.2.3</generator>
<language>en</language>
<lastBuildDate><?=dated(strtotime ("now"));?></lastBuildDate>
<image>
<url>http://interlopers.net/forum/templates/subSilver/images/logo_phpBB_med.gif</url>
<title>Forum latest</title>
<link>http://interlopers.net/forum/</link>
<width>122</width>
<height>56</height>
</image>
<?php
include("config.php");
mysql_connect($dbhost, $dbuser, $dbpasswd) or die("ERROR: can't connect to database");
mysql_select_db($dbname) or die("ERROR: Can't switch database");
$l= isset($_GET['p'])? intval($_GET['p']) : 10;
if ($l<0 || $l>50) $l=10;
$sql="SELECT
p.topic_id,
p.post_id,
t.topic_title,
u.user_id,
u.username,
p.post_time
FROM
phpbb_posts p,
phpbb_users u,
phpbb_topics t
WHERE
t.topic_id = p.topic_id AND
u.user_id = t.topic_poster
GROUP BY
p.topic_id
ORDER BY
p.post_time
LIMIT 0, $l";
$r= mysql_query($sql);
if (!$r) die("ERROR: Can't query database".mysql_error());
while ($res = mysql_fetch_assoc($r)) {
$res['username']=htmlentities($res['username']);
$res['topic_title']=htmlentities($res['topic_title']);
?>
<item>
<title><?=$res['topic_title'];?></title>
<link>http://www.interlopers.net/forum/viewtopic.php?t=<?=$res['topic_id'];?></link>
<pubDate><?=dated($res['post_time']);?></pubDate>
<guid isPermaLink="true">http://www.interlopers.net/forum/viewtopic.php?t=<?=$res['topic_id'];?></guid>
<description>
By <a href="http://interlopers.net/forum/profile.php?mode=viewprofile&u=<?=$res['user_id'];?>"><?=$res['username'];?></a>
</description>
<dc:creator><?=$res['username'];?></dc:creator>
<dc:subject>Forum latest</dc:subject>
<annotate:reference rdf:resource="http://www.interlopers.net/forum/viewtopic.php?t=<?=$res['topic_id'];?>" />
<comments>http://www.interlopers.net/forum/posting.php?mode=quote&p=<?=$res['post_id'];?></comments>
</item>
<?php
}
?>
</channel>
</rss>
<?php
function dated($date) {
echo date('Y-m-d\Th:i:s',$date). substr_replace(date('O',$date),':',3,0);
}


yea, but this is for the entire forum. Offcourse if you dont want it...Blink wrote:Already using that for the main RSS on the news.

Users browsing this forum: No registered users