1
micaheli
Re: Rss backendforums.php (Great Idea) Will newbb be able to handel it?
  • 2004/1/6 3:01

  • micaheli

  • Just popping in

  • Posts: 1

  • Since: 2004/1/6 2


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>
";
?>




TopTop



Login

Who's Online

240 user(s) are online (158 user(s) are browsing Support Forums)


Members: 0


Guests: 240


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits