1
Here's my rss.php that I created and am using.
Basically, its an atonomous rss file. Should work with newbb, newbb_plus (currently the default) and phpBB with a little tweaking.
It doesn't have a config file or anything and requires a little coding unless you have newbb_plus, but it works rather well and is simple.
Check it out at this url: (rssid is the forum id)
http://www.aquariaphile.com/rss.php?rssid=1
Here's the code:
<?php
include("mainfile.php");
$rssid = $_GET['rssid'];
$prefix = $xoopsConfig['prefix'];
header("Content-Type: text/xml");
echo "
<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">
<channel><title>";
$forumresult = mysql_query("SELECT forum_name,forum_desc FROM ".$prefix."_bbplus_forums where forum_id=$rssid");
while($row = mysql_fetch_array($forumresult)) {
echo $row["forum_name"]." - ".$row["forum_desc"];
}
echo "</title><link>http://".$_SERVER['SERVER_NAME']."/modules/newbb_plus/viewforum.php?forum=".$rssid."</link>
<description>".$meta['description']."</description>
<language>en-us</language>
";
$result = mysql_query("SELECT topic_id,subject,post_text,type,post_time FROM ".$prefix."_bbplus_posts where forum_id=$rssid ORDER BY post_time DESC LIMIT 30");
while($row = mysql_fetch_array($result)) {
$realtime = formatTimestamp($row["post_time"], "m");
echo "
<item>
<title>".$row["subject"]."</title>
<link>http://".$_SERVER['SERVER_NAME']."/modules/newbb_plus/viewtopic.php?topic_id=".$row["topic_id"]."&forum=".$rssid."</link>
<description>".$row["post_text"]."</description>
<dc:creator>".$row["type"]."</dc:creator>
<dc:date>$realtime</dc:date>
</item>";
}
echo "
</channel>
</rss>
";
?>
Basically, its an atonomous rss file. Should work with newbb, newbb_plus (currently the default) and phpBB with a little tweaking.
It doesn't have a config file or anything and requires a little coding unless you have newbb_plus, but it works rather well and is simple.
Check it out at this url: (rssid is the forum id)
http://www.aquariaphile.com/rss.php?rssid=1
Here's the code:
<?php
include("mainfile.php");
$rssid = $_GET['rssid'];
$prefix = $xoopsConfig['prefix'];
header("Content-Type: text/xml");
echo "
<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">
<channel><title>";
$forumresult = mysql_query("SELECT forum_name,forum_desc FROM ".$prefix."_bbplus_forums where forum_id=$rssid");
while($row = mysql_fetch_array($forumresult)) {
echo $row["forum_name"]." - ".$row["forum_desc"];
}
echo "</title><link>http://".$_SERVER['SERVER_NAME']."/modules/newbb_plus/viewforum.php?forum=".$rssid."</link>
<description>".$meta['description']."</description>
<language>en-us</language>
";
$result = mysql_query("SELECT topic_id,subject,post_text,type,post_time FROM ".$prefix."_bbplus_posts where forum_id=$rssid ORDER BY post_time DESC LIMIT 30");
while($row = mysql_fetch_array($result)) {
$realtime = formatTimestamp($row["post_time"], "m");
echo "
<item>
<title>".$row["subject"]."</title>
<link>http://".$_SERVER['SERVER_NAME']."/modules/newbb_plus/viewtopic.php?topic_id=".$row["topic_id"]."&forum=".$rssid."</link>
<description>".$row["post_text"]."</description>
<dc:creator>".$row["type"]."</dc:creator>
<dc:date>$realtime</dc:date>
</item>";
}
echo "
</channel>
</rss>
";
?>