[2.0.6] RSS Content Syndicator

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
119
64%
Very Good
41
22%
Good
13
7%
Fair
5
3%
Poor
7
4%
 
Total votes: 185

tonymccallie
Registered User
Posts: 3
Joined: Sun Nov 30, 2003 2:58 am
Location: Amarillo, TX

Post by tonymccallie » Sun Nov 30, 2003 4:24 pm

WooHoo! I got this working in phpNuke! Here's the stuff you need to make it work. VERY SIMPLE
Edit these two lines in rss.php
line 71 wrote: include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
to
include($phpbb_root_path . '../../includes/bbcode.'.$phpEx);

and
line 79 wrote: $userdata = session_pagestart($user_ip, PAGE_INDEX);
to
$userdata = session_pagestart($user_ip, PAGE_INDEX, $nukeuser);


Place rss.php in /modules/Forums/ (thanks nschindler!)

Nows here's the painful part (sorry guys) you need to upload rss_body.tpl into EVERY theme :(
e.g.
/themes/{THEMENAME}/forums/rss_body.tpl

And you have to use phpNukes way of calling files.
(/modules.php?name=Forums&file=rss)

Here's an example:
http://www.christianpipesmokers.org/mod ... s&file=rss

Hope this helps someone, this is a great MOD.

Blessings all, Tony

tonymccallie
Registered User
Posts: 3
Joined: Sun Nov 30, 2003 2:58 am
Location: Amarillo, TX

Post by tonymccallie » Sun Nov 30, 2003 5:02 pm

I found I had to make several additional corrections to rss.php. The original posted corrections make the MOD pull the information, but the links are all wrong. I've posted a patched version of rss.php here:
http://www.bluedogtek.com/files/scripts/rssMOD.zip

The sample I posted above is working correctly now.

Many blessings, Tony

rabidgopher04
Registered User
Posts: 664
Joined: Wed Mar 05, 2003 3:54 am

Post by rabidgopher04 » Sun Nov 30, 2003 5:14 pm

kwnah wrote: are you using the CaRP Free version, CaRP Koi or CaRP Evolution ?


The free one of course :D

nschindler
Registered User
Posts: 101
Joined: Tue Jun 17, 2003 12:24 am
Location: Los Angeles, CA, USA
Contact:

Post by nschindler » Sun Nov 30, 2003 9:35 pm

kwnah wrote: Fedora Core 1 is the to replace of RedHat Linux right ?


Yeah, it's basically Red Hat 10. They've made a lot of improvements.

nschindler
Registered User
Posts: 101
Joined: Tue Jun 17, 2003 12:24 am
Location: Los Angeles, CA, USA
Contact:

Post by nschindler » Sun Nov 30, 2003 9:38 pm

tonymccallie wrote: I found I had to make several additional corrections to rss.php. The original posted corrections make the MOD pull the information, but the links are all wrong. I've posted a patched version of rss.php here:
http://www.bluedogtek.com/files/scripts/rssMOD.zip

The sample I posted above is working correctly now.

Many blessings, Tony


Thanks for posting your findings. Sounds like you may save other phpNuke users a lot of time. :)

rabidgopher04
Registered User
Posts: 664
Joined: Wed Mar 05, 2003 3:54 am

Post by rabidgopher04 » Mon Dec 01, 2003 5:46 am

Hi, I just noticed something about this MOD. It only displays new topics and not if there is a new post nor moves the topic with a new post to the top of the list. Is there a way this feature could be added as an option?

Let me know if you need more clarification or if this was not within the scope of the project. Thanks :)

kwnah
Registered User
Posts: 88
Joined: Fri Oct 24, 2003 2:16 pm
Contact:

Post by kwnah » Mon Dec 01, 2003 7:30 am

tonymccallie wrote: I found I had to make several additional corrections to rss.php. The original posted corrections make the MOD pull the information, but the links are all wrong. I've posted a patched version of rss.php here:
http://www.bluedogtek.com/files/scripts/rssMOD.zip

The sample I posted above is working correctly now.

Many blessings, Tony


does your rss.php work with pure phpBB 2.0.6 user ? or only for PostNuke + phpBB2.0.6 ...

nschindler
Registered User
Posts: 101
Joined: Tue Jun 17, 2003 12:24 am
Location: Los Angeles, CA, USA
Contact:

Post by nschindler » Mon Dec 01, 2003 8:20 am

kwnah wrote: does your rss.php work with pure phpBB 2.0.6 user ? or only for PostNuke + phpBB2.0.6 ...


...uhm.......no. You don't need phpNuke or PostNuke for this MOD to function. In fact, if you noticed, the person you quoted had to modify rss.php to work with phpNuke, because rss.php was not originally written for phpNuke. Also, in case you're confused, phpNuke and PostNuke are essentially the same thing.

Are you asking because you can't get the MOD to work with a stand-alone installation of phpBB 2.0.6?
Look, it's simple. Let's say your forum is at http://www.whatever.com/phpBB2. You would put rss.php in the phpBB2 folder. If you're using "subSilver" as your theme, then you would put rss_body.tpl in phpBB2/templates/subSilver. If you're NOT using subSilver, then you would put rss_body.tpl in phpBB2/templates/<your template's name>. You only need to wory about the board's default template; the one that's used for Guest access.
Now, if you point a web browser to http://www.whatever.com/phpBB2/rss.php, you should get an XML page. That means the feed is working. Now, all you have to do is point an aggregator at that URL, and *poof*, you're done.
Again, if you want a working example, look at http://www.sins.la/phpBB2/rss.php.
This is RSS, and this is pretty much all RSS does. It's just an XML page. The rest of the work is up to whatever aggregator you choose to use. If you don't want to set a web server up to run carp, then I suggest you look at the first page of this topic, where there were some free personal aggregators mentioned for any major operating system.

I hope this helps. If you need any further assistance, please reply with your specific problem. If you're not at all familiar with RSS, how it works, or what it's used for, then this MOD may not be for you. You may want to look into Topics Anywhere instead.

kwnah
Registered User
Posts: 88
Joined: Fri Oct 24, 2003 2:16 pm
Contact:

Post by kwnah » Mon Dec 01, 2003 10:29 am

I guess I find out my problem..... rss.php is working, just need a nice RSS aggregator in my phpbb 2.0.6

Thanks anyway.

bartje74
Registered User
Posts: 8
Joined: Wed Sep 18, 2002 10:40 am
Location: groningen
Contact:

Post by bartje74 » Wed Dec 03, 2003 9:39 pm

I just keep comming back on my forum....

with the line "no results found"

I uploaded the two files to my forum rss.php to my root where phpbb si nstalled and the other to templates/subsilver/

so what am ik doing wrong???

:roll:
my sign.......

nschindler
Registered User
Posts: 101
Joined: Tue Jun 17, 2003 12:24 am
Location: Los Angeles, CA, USA
Contact:

Post by nschindler » Thu Dec 04, 2003 9:27 am

rabidgopher04 wrote: Hi, I just noticed something about this MOD. It only displays new topics and not if there is a new post nor moves the topic with a new post to the top of the list. Is there a way this feature could be added as an option?

Let me know if you need more clarification or if this was not within the scope of the project. Thanks :)


by default, it displays new posts. it only displays 'start of topic' posts when you call it as "rss.php?t=1". the newest item should be at the top of the list.
if this isn't your experience, please clarify... i'm confused.

nschindler
Registered User
Posts: 101
Joined: Tue Jun 17, 2003 12:24 am
Location: Los Angeles, CA, USA
Contact:

Post by nschindler » Thu Dec 04, 2003 9:32 am

bartje74 wrote: I just keep comming back on my forum....

with the line "no results found"

I uploaded the two files to my forum rss.php to my root where phpbb si nstalled and the other to templates/subsilver/

so what am ik doing wrong???

:roll:


i don't know where "no results found" is coming from... that's not from the rss mod. it either works, or you get php errors. there's very little error handling written in.

...so, you put rss.php in your phpbb root, and you put rss_body.tpl in your templates/<whatever template you're using> folder, then you tried to load rss.php in a web browser.... and you say it's telling you "no results found"?
PM me with the url to your forum. i'm interested in seeing this.

LoOoD
Registered User
Posts: 43
Joined: Tue Sep 24, 2002 6:47 am

so slow!!!

Post by LoOoD » Fri Dec 05, 2003 2:08 am

It takes 15 - 25 seconds for rss.php to finish what its suppose to get.

http://forums.thevboard.com/rss.php?t=1

While doing a "mysqladmin -v -p processlist", mysql says "Copying to tmp table".. The sql running is :

Code: Select all

SELECT f.forum_name, t.topic_title, u.user_id, u.username, u.user_sig, u.user_sig_bbcode_uid, p.post_id, pt.post_text, pt.post_subject, pt.bbcode_uid, p.post_time, t.topic_replies, t.topic_first_post_id
        FROM phpbb_forums AS f, phpbb_topics AS t, phpbb_users AS u, phpbb_posts AS p, phpbb_posts_text as pt
        WHERE
                t.forum_id = f.forum_id
                        AND f.auth_view = 0
                        AND p.poster_id = u.user_id
                        AND pt.post_id = p.post_id
                        AND p.topic_id = t.topic_id

                         
        ORDER BY p.post_time DESC LIMIT 15
Is it suppose to take a long of a time? and what can I do to make it run faster?

nschindler
Registered User
Posts: 101
Joined: Tue Jun 17, 2003 12:24 am
Location: Los Angeles, CA, USA
Contact:

Re: so slow!!!

Post by nschindler » Fri Dec 05, 2003 2:39 am

LoOoD wrote: It takes 15 - 25 seconds for rss.php to finish what its suppose to get.

http://forums.thevboard.com/rss.php?t=1

While doing a "mysqladmin -v -p processlist", mysql says "Copying to tmp table".. The sql running is :

Code: Select all

SELECT f.forum_name, t.topic_title, u.user_id, u.username, u.user_sig, u.user_sig_bbcode_uid, p.post_id, pt.post_text, pt.post_subject, pt.bbcode_uid, p.post_time, t.topic_replies, t.topic_first_post_id
        FROM phpbb_forums AS f, phpbb_topics AS t, phpbb_users AS u, phpbb_posts AS p, phpbb_posts_text as pt
        WHERE
                t.forum_id = f.forum_id
                        AND f.auth_view = 0
                        AND p.poster_id = u.user_id
                        AND pt.post_id = p.post_id
                        AND p.topic_id = t.topic_id

                         
        ORDER BY p.post_time DESC LIMIT 15
Is it suppose to take a long of a time? and what can I do to make it run faster?


For me to load the link you provided takes less than 5 seconds. It's got a lot to do with server load, though. I may have tried to load it when the server didn't have much to do.
1- rss.php has a pretty big select statement. Not all of it displays in the output; some fields are needed in 'where' clauses, because phpBB's schema doesn't have joins. Compared to some of the other areas of phpBB, the load that the select statement puts on the server should be about normal, though
2- More importantly, I think it's a little slow because of the item loop using a "while" instead of "for". Most of phpBB itself uses "for" loops, I think. I had an easier time modifying the original version of this mod using a "while" loop. I don't know exactly how valid this assumption is, but it's my best guess.

My feed, which pulls the default 10 posts, usually takes about 3 seconds. It's running on a pretty good server, though.

This was my very first php project, and most of what I did was modifying stuff that was already there, or reverse engineering example code when I needed to. I don't know much about optimizing php code for performance... if anybody has suggestions, I'm happy to hear them.

mc717990
Registered User
Posts: 1
Joined: Mon Dec 08, 2003 3:50 am
Contact:

For security, add this

Post by mc717990 » Mon Dec 08, 2003 3:52 am

Well, it's more change the where statement to this:

WHERE
t.forum_id = f.forum_id
AND f.auth_view = " . AUTH_ALL . " AND f.auth_read = 0
AND p.poster_id = u.user_id
AND pt.post_id = p.post_id
AND p.topic_id = t.topic_id
$sql_topics_only_where
$sql_forum_where

There's probably a more "correct" method, but f.auth_read is the one that limits access to reading a forum. I think auth_view is limiting access to whether they can see the forum exists.

Post Reply

Return to “[2.0.x] MOD Database Cleanup”