1
script_fu
Rss backendforums.php (Great Idea) Will newbb be able to handel it?

Found this lil tidbit over at e-xoops and nuke cops. Will newbb be able to handel this puppy?


_____________________________________________________


/************************************************************************/
/* RSS Feed for PHP-Nuke phpBB2 Forums */
/* =================================== */
/* */
/* Copyright (c) 2003 by Paul Laudanski (Zhen-Xjell) */
/* http://nukecops.com */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* See a copy of the GPL licensed attached in the archive. */
/************************************************************************/

include("mainfile.php");

header("Content-Type: text/xml");
$result = sql_query("SELECT t.topic_id, t.topic_title FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id and f.auth_view=0 ORDER BY t.topic_last_post_id DESC LIMIT 10", $dbi);

if (!result) {
echo "An error occured";
} else {
echo "\n\n";
echo " echo " \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n\n";
echo "\n\n";
echo "\n";
echo "".htmlspecialchars($sitename)."- Forums\n";
echo "$nukeurl\n";
echo "".htmlspecialchars($backend_title)."\n";
echo "$backend_language\n\n";
for ($m=0; $m < sql_num_rows($result, $dbi); $m++) {
list($topic_id, $topic_title) = sql_fetch_row($result, $dbi);
echo "\n";
echo "".htmlspecialchars($topic_title)."\n";
echo "$nukeurl/postt$topic_id.html\n";
echo "
\n\n";
}
echo "
\n";
echo "
";
}

?>
_____________________________________________________


http://nukecops.com/forums.html

This is smokin...

2
Bazus
Re: Rss backendforums.php (Great Idea) Will newbb be able to handel it?
  • 2004/1/5 4:10

  • Bazus

  • Not too shy to talk

  • Posts: 144

  • Since: 2002/9/23


what does this do ? what's the idea

3
script_fu
Re: Rss backendforums.php (Great Idea) Will newbb be able to handel it?

This code will take your forum posts and feed them to other sites just like a rss news feed to other sites.

4
script_fu
Re: Rss backendforums.php (Great Idea) Will newbb be able to handel it?

I been emailing back and fourth with the guy who hacked the code above which btw is bundled in the nukecops package.
http://snaps.nukecops.com/

I found this download on e-xoops.com and wondered why XOOPS doesn't offer this. The problem is the file put up for download over at e-xoops must have been mixed up with the nukecops file. So im hopeing the guy who made a mod on the code above will show up here and post the hack!

5
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:

include("mainfile.php");
$rssid = $_GET['rssid'];
$prefix = $xoopsConfig['prefix'];
header("Content-Type: text/xml");
echo "

";<br>$forumresult = mysql_query("SELECT forum_name,forum_desc FROM ".$prefix."_bbplus_forums where forum_id=$rssid");<br>while($row = mysql_fetch_array($forumresult)) {<br>echo $row["forum_name"]." - ".$row["forum_desc"];<br>}<br>echo "http://".$_SERVER['SERVER_NAME']."/modules/newbb_plus/viewforum.php?forum=".$rssid."
".$meta['description']."
en-us
";

$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 "

".$row["subject"]."
http://".$_SERVER['SERVER_NAME']."/modules/newbb_plus/viewtopic.php?topic_id=".$row["topic_id"]."&forum=".$rssid."
".$row["post_text"]."
".$row["type"]."
$realtime
";
}
echo "


";
?>

6
script_fu
Re: Rss backendforums.php (Great Idea) Will newbb be able to handel it?

Micaheli thank you for your time and posting the code above. Now to get this working with XOOPS 2...

(okay)
I converted all the new_bb refrences in micaheli post above but have not been able to get this code working yet on 2.0.5.x ????

I did get newbb_plus installed on my e-xoops site. Then set up micaheli's code and it works fine. I have a feed going from my e-xoops site to one of my XOOPS sites. Would anyone care to take a shot at this? Im missing something.

Newbb_plus is one cool module that should be ported over to XOOPS 2. You can use phpbb themes infact the newbb_plus when installed has two themes with it. (very sweet)


7
soconfused
Re: Rss backendforums.php (Great Idea) Will newbb be able to handel it?
  • 2005/7/19 18:35

  • soconfused

  • Not too shy to talk

  • Posts: 108

  • Since: 2005/4/2 1


Hello

I'm trying to get this to work with the pbboard but I just get 'feed contains no items' when accessed through rss reader. Any ideas?

include("mainfile.php");
$rssid = $_GET['rssid'];
$prefix = $xoopsConfig['prefix'];
header("Content-Type: text/xml");
echo "

";<br>$forumresult = mysql_query("SELECT forum_name,forum_desc FROM ".$prefix."_xpbb_forums where <br><br>forum_id=$rssid");<br>while($row = mysql_fetch_array($forumresult)) {<br>echo $row["forum_name"]." - ".$row["forum_desc"];<br>}<br>echo <br><br>"http://".$_SERVER['SERVER_NAME']."/modules/pbboard/viewforum.php?forum=".$rssid.

"
".$meta['description']."
en-us
";

$result = mysql_query("SELECT topic_id,subject,post_text,type,post_time FROM

".$prefix."_xpbb_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 "

".$row["subject"]."
http://".$_SERVER['SERVER_NAME']."/modules/pbboard/viewtopic.php?topic_id=".$row["topic_i

d"]."&forum=".$rssid."
".$row["post_text"]."
".$row["type"]."
$realtime
";
}
echo "


";
?>

Login

Who's Online

363 user(s) are online (256 user(s) are browsing Support Forums)


Members: 0


Guests: 363


more...

Donat-O-Meter

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

Latest GitHub Commits