simple RSS mod for phpBB3

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
User avatar
irdem
Registered User
Posts: 177
Joined: Sat Oct 13, 2007 10:31 pm

Re: simple RSS mod for phpBB3

Post by irdem »

hello,
for the link of last post, i made a small change in line:

Code: Select all

 	   $post_link    = $board_url."/viewtopic.".$phpEx."?f=".$forumid."&t=".$topicid."#p".$row['topic_last_post_id'];

replaced with:

Code: Select all

              	   $post_link    = $board_url."/viewtopic.".$phpEx."?f=".$forumid."&t=".$topicid."&p=".$row['topic_last_post_id']."#p".$row['topic_last_post_id'];
User avatar
cedarrapidsboy
Registered User
Posts: 35
Joined: Thu Sep 29, 2005 9:45 pm

Per-topic RSS feed (Re: simple RSS mod for phpBB3)

Post by cedarrapidsboy »

Thanks for the simple RSS mod. I was looking for this, but wanted just a bit more. Our forum is quite diverse, and receiving updates for the entire board, via RSS, is not desired for many users. The following modifications alter this mod to generate an RSS feed for the current topic (and its children/grandchildren).

For instance, if you are viewing the root of the board (f=0), an RSS for the entire board is generated. However, if you are viewing a particular forum (f=33), by clicking the RSS icon, you get a feed that includes all posts for f=33 and all children and grandchildren.

This is a mod of the mod. It depends on you having already installed the original mod.

In rss.php, find:

Code: Select all

include($phpbb_root_path . 'language/en/common.' . $phpEx);
add the following on a blank line after:

Code: Select all

include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
In rss.php, find:

Code: Select all

//Get the board url address
$board_url = generate_board_url();
add the following on a blank line after:

Code: Select all

if (!$f){
	$f = 'AND f.forum_id = f.forum_id';
} else {
	$rows = get_forum_branch($f, 'children', 'descending', true);
	$f='AND (';
	foreach ($rows as $row){
		$f .= 'OR f.forum_id = ' . $row['forum_id'] . "\n";
	}
	$f.=')';
	$f = str_replace("(OR ","(",$f);
}
In rss.php, find:

Code: Select all

        $sql = 'SELECT f.forum_id,f.forum_name, f.forum_desc_options, t.topic_title, t.topic_id,t.topic_last_post_id,t.topic_last_poster_name, p.post_time, p.post_text, 
        	p.bbcode_uid, p.bbcode_bitfield, u.username, u.user_id
                FROM  '. FORUMS_TABLE .'  f,'.TOPICS_TABLE.' t, '.POSTS_TABLE.' p,'.USERS_TABLE.' u
                WHERE t.forum_id = f.forum_id
                AND t.topic_status != 1
                AND p.post_id = t.topic_last_post_id 
                AND u.user_id = p.poster_id
                ORDER BY t.topic_last_post_id DESC';	
replace with:

Code: Select all

        $sql = 'SELECT f.forum_id,f.forum_name, f.forum_desc_options, t.topic_title, t.topic_id,t.topic_last_post_id,t.topic_last_poster_name, p.post_time, p.post_text, 
        	p.bbcode_uid, p.bbcode_bitfield, u.username, u.user_id
                FROM  '. FORUMS_TABLE .'  f,'.TOPICS_TABLE.' t, '.POSTS_TABLE.' p,'.USERS_TABLE.' u
                WHERE t.forum_id = f.forum_id
                AND t.topic_status != 1
                AND p.post_id = t.topic_last_post_id 
                AND u.user_id = p.poster_id
                '.$f.'
                ORDER BY t.topic_last_post_id DESC';	
in includes/functions.php, find:

Code: Select all

'U_RSS'			=>append_sid("{$phpbb_root_path}rss.$phpEx"), 
replace with:

Code: Select all

'U_RSS'			=>append_sid("{$phpbb_root_path}rss.$phpEx") . (($f === 0 || !(empty($f))) ? '?f=' . $f : ''),
The above code may not follow guidelines, so I welcome optimizations/corrections by those smarter and more inclined. I'm particularly concerned about the inclusion of the admin_functions, but think the original mod does due-diligence in preventing unauthorized access.

These simple additions to the already brilliant RSS feed mod, I think, make it even more useful. Thanks again for the original work.
prpldodge
Registered User
Posts: 2
Joined: Fri Oct 24, 2008 8:48 pm

Re: simple RSS mod for phpBB3

Post by prpldodge »

I have install the mod and it seems to be working with one exception. It repeats the same forum post about 9 times. I have changed one line

Code: Select all

  WHERE t.forum_id = 7
I only want it to post from one forum. I also would like it to show the replies. I tried some of the code examples on this forum topic but they all seem to do the same thing with the repeat.

Any thoughts?

Alan
User avatar
cedarrapidsboy
Registered User
Posts: 35
Joined: Thu Sep 29, 2005 9:45 pm

Re: simple RSS mod for phpBB3

Post by cedarrapidsboy »

prpldodge wrote:I have install the mod and it seems to be working with one exception. It repeats the same forum post about 9 times. I have changed one line

Code: Select all

  WHERE t.forum_id = 7
I only want it to post from one forum. I also would like it to show the replies. I tried some of the code examples on this forum topic but they all seem to do the same thing with the repeat.

Any thoughts?

Alan
Don't have any immediate thoughts about the "replies" issue, but my modification above (two posts) should allow you to get a feed for the currently visible forum, reducing the number of posts you see in your feed.
prpldodge
Registered User
Posts: 2
Joined: Fri Oct 24, 2008 8:48 pm

Re: simple RSS mod for phpBB3

Post by prpldodge »

I have change the Rss.php and the functions.php. It works fine until I change the

Code: Select all

WHERE t.forum_id = 7
Then it starts repeating. Does this not work to only select one forum?

Check out http://www.saylorvilleyachtclub.org/phpBB3/rss.php you will see what I mean.

Alan
testbunny2
Registered User
Posts: 27
Joined: Thu Jul 19, 2007 8:53 am
Location: Sweden

Re: Per-topic RSS feed (Re: simple RSS mod for phpBB3)

Post by testbunny2 »

cedarrapidsboy:

I tried your edits, and it changes the link just fine to: /rss.php?f=* but it still shows all latest posts across the entire forum. No matter what number is put there..
(Tried double-checking it and all that)
bnorth
Registered User
Posts: 4
Joined: Wed Jun 18, 2008 10:49 am

Re: simple RSS mod for phpBB3

Post by bnorth »

deepack wrote:Hi,
thanks for this MOD. But I don't understand why new messages are not automatically include in the RSS feed. It's already bloked with the old messages.
edit: it's about 180min that the new message is in the RSS feed. Is it normal?
Does anyone have any comment on this? I'm also finding that new posts are not being included in the feed...at least not since I installed v1.0.5 a hour or so ago.
sheltonjb
Registered User
Posts: 71
Joined: Tue May 06, 2008 10:30 pm

Re: simple RSS mod for phpBB3

Post by sheltonjb »

this says it's for version 3.0.2, i'm running 3.0.1, will it still work ok with that?

thanks
dan909
Registered User
Posts: 54
Joined: Sun Feb 17, 2008 7:09 pm

Re: simple RSS mod for phpBB3

Post by dan909 »

dan909 wrote:
dan909 wrote:Hi,

Love this mod!

Just one question. Is it possible to make an .xml page for the feed ?

Reason I ask is that although I can access the rss.php page online, I just get a blank page when accessing it from a mobile device.
Anyone got any ideas ?!
Anyone ???!!!
oglach
Registered User
Posts: 498
Joined: Sun Apr 22, 2007 5:58 pm

Re: simple RSS mod for phpBB3

Post by oglach »

does this just show posts/forums ppl have permissions too?
amsnet
Registered User
Posts: 103
Joined: Sun Jun 18, 2006 8:42 pm

Re: simple RSS mod for phpBB3

Post by amsnet »

I am looking for an RSS feed option that lets me or the author place the content of the post into a feed. That feed would then get pinged by sites like PingOmatic for distribution to the major news readers. We do not want a general feed of all posts as some might be sensitive. Just a button that would output the one post to the RSS file of my choice.
Thanks
Nev
pacca
Registered User
Posts: 5
Joined: Sat Nov 08, 2008 10:18 am

Re: simple RSS mod for phpBB3

Post by pacca »

i'm new in phpbb3 ... i download this mod ...
what do i have to do to install it ?


please help
User avatar
barryoneoff
Registered User
Posts: 248
Joined: Sat Mar 24, 2007 10:14 pm
Location: East London, England

Re: simple RSS mod for phpBB3

Post by barryoneoff »

Open the xml file (which you will find inside the folder) in IE and follow the instructions.
Image
Click above to support St. Josephs Hospice.
Barryoneoff's London. ... City of London walks.
User avatar
nguyencongminh
Registered User
Posts: 107
Joined: Thu Jul 10, 2008 1:38 pm

Re: simple RSS mod for phpBB3

Post by nguyencongminh »

Can we configure this mod for skiping rss with some sub forum?
Creating Communities
User avatar
nguyencongminh
Registered User
Posts: 107
Joined: Thu Jul 10, 2008 1:38 pm

Re: Per-topic RSS feed (Re: simple RSS mod for phpBB3)

Post by nguyencongminh »

cedarrapidsboy wrote:Thanks for the simple RSS mod. I was looking for this, but wanted just a bit more. Our forum is quite diverse, and receiving updates for the entire board, via RSS, is not desired for many users. The following modifications alter this mod to generate an RSS feed for the current topic (and its children/grandchildren).

For instance, if you are viewing the root of the board (f=0), an RSS for the entire board is generated. However, if you are viewing a particular forum (f=33), by clicking the RSS icon, you get a feed that includes all posts for f=33 and all children and grandchildren.

This is a mod of the mod. It depends on you having already installed the original mod.

The above code may not follow guidelines, so I welcome optimizations/corrections by those smarter and more inclined. I'm particularly concerned about the inclusion of the admin_functions, but think the original mod does due-diligence in preventing unauthorized access.

These simple additions to the already brilliant RSS feed mod, I think, make it even more useful. Thanks again for the original work.
Thanks. I did it carefully, but no chances with rss.php?f=id ... Why?
Creating Communities

Return to “[3.0.x] MOD Database Releases”