FAQ: phpBB 3.0.6 ATOM feed

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
wouterv
Registered User
Posts: 265
Joined: Wed Jan 02, 2008 10:22 am
Location: The Netherlands
Name: Wouter

FAQ: phpBB 3.0.6 ATOM feed

Post by wouterv » Wed Jan 13, 2010 8:56 pm

NOTE: A lot has changed in the 3.0.7 Atom feed, a lot of the notes below are only valid for 3.0.6.
Also mind the new 3.0.7-PL1 release.

Updated: FAQ: phpBB ATOM feed.

What is this
This is a collection of things to know about the standard phpBB 3.0.6 ATOM feed option.

Feed format
The standard phpBB 3.0.6 feed is ATOM format, not RSS, some feed readers may not be able to properly read the ATOM format. Although valid ATOM, it is quite unusual structured. There are no plans to add RSS format support with phpBB 3.x.

How to enable and where do I see it
To enable the feed in its basic form, go to: ACP>General>Feed settings
Set "Enable Feeds" to "Enabled", leave all the rest default to start with and Submit the change.
If you return to the Board Index page, your browser (IE or FF) should show a selectable feed icon near the address bar which will open the feed page.

Open feed by URL
The basic feed URL for use in a browser that support feeds or in a feed reader is:
http://yoursite.xx/phpbb/feed.php

Security, access rights and passworded
The feed will show forums according the user credentials, if you have not logged in to the board, the feed will use Guests rights. Once you have logged in, your browser will keep the credentials wich may be passed to the feed and show forums accordingly.
Passworded forums are not shown at all.

Feed options
The different feed settings can be explained as follows:
Enable Feeds: create a feed that shows the last posts for any topic in any forum, newest on top.
Enable overall forums feed: create a feed that shows forums listed in order of newest post, newest on top.
Enable overall topics feed: create a feed that shows the first post for any topic in any forum, newest on top.
Enable Per-Forum Feeds: create a feed for every forum page, with the last posts for any topic, newest on top.
Enable Per-Topic Feeds: create a forum for every topic page, with the last posts, newest on top.
General: you can set a number for the amount of posts in different feeds and filter or exclude forums.

Posts not older then 30 days
Per default the feeds only show posts not older then 30 days, this number can be changed in feed.php:

Code: Select all

       /**
       * Default setting for last x days
       */
       var $sort_days = 30;
You may change the "30" to any number of days.

Enable feed icon with non-default style
If you use an other style then the default ProSilver or SubSilver2 or ProSilver Special Edition, you need to modify your "overall_header.php" in "/styles/yourstyle/template" to include the feed icon activation:
Find:

Code: Select all

<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
Add after:

Code: Select all

<!-- IF S_ENABLE_FEEDS -->
	<link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" />
	<!-- IF S_ENABLE_FEEDS_NEWS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{U_FEED}?mode=news" /><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_FORUMS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{U_FEED}?mode=forums" /><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_TOPICS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_TOPICS}" href="{U_FEED}?mode=topics" /><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{U_FEED}?f={S_FORUM_ID}" /><!-- ENDIF -->
	<!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&t={S_TOPIC_ID}" /><!-- ENDIF -->
<!-- ENDIF -->
Then do a board cache refresh and refresh your browser cache.

Add feed icon in forum header
If you want a feed icon in your forum header, edit "overall_header.html" as follows:
Find:

Code: Select all

<li class="icon-home"><a href="{U_INDEX}" accesskey="h">{L_INDEX}</a> <!-- BEGIN navlinks --> <strong>&#8249;</strong> <a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks --></li>
Add after:

Code: Select all

<!-- IF S_ENABLE_FEEDS --><li class="rightside"><a type="application/rss+xml" href="{U_FEED}"><img src="feed-icon-14x14.png" alt="{L_FEED} - {SITENAME}" title="{L_FEED} - {SITENAME}" /></a></li><!-- ENDIF -->
Then do a board cache refresh and refresh your browser cache.
Note: Picture file "feed-icon-14x14.png" must be loaded on your system and the path must be set correct.

Bugs
The original 3.0.6 feed.php (build 10244) code contains a date formatting error. An explanation and fix can be found here: http://www.phpbb.com/community/viewtopi ... #p11448695
Last edited by wouterv on Sat Jul 23, 2011 6:03 am, edited 15 times in total.

User avatar
HGN
Former Team Member
Posts: 4706
Joined: Wed Dec 03, 2008 1:53 pm
Location: The Netherlands
Name: Alfred
Contact:

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by HGN » Wed Jan 13, 2010 9:57 pm

You should submit this to the Knowledge Base.

User avatar
Meht_Prince
Registered User
Posts: 26
Joined: Wed Mar 22, 2006 9:28 am
Contact:

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by Meht_Prince » Wed Feb 17, 2010 11:10 am

This post helped me straighten out the lack of a feed link in my header, but then I made a few tweaks, to make it even more user-friendly. I'm using this code, instead of the ADD AFTER, above:

Code: Select all

<!-- IF S_ENABLE_FEEDS --><li class="rightside"><!-- IF not S_FORUM_ID and not S_TOPIC_ID --><a type="application/rss+xml" href="{U_FEED}"><!-- ENDIF --> <!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><a type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{U_FEED}?f={S_FORUM_ID}" /><!-- ENDIF --><!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><a type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&t={S_TOPIC_ID}" /><!-- ENDIF --><img src="http://amortentia.groundline.net/images/feed-icon-14x14.png" alt="{L_FEED} - {SITENAME}" /></a></li><!-- ENDIF -->
Basically, it checks to see if you're in a forum or topic, and if you are, it replaces the default feed link with the feed for the forum or topic you're looking at. Of course, it doesn't work properly if neither forum nor topic feeds are enabled, because I'm just not that cool... But if they are, this is the easy way to make the link work right.
"It has been said that man is a rational animal. All my life I have been looking for evidence which could support this." - Bertrand Russell

FrankTC
Registered User
Posts: 2
Joined: Mon Aug 20, 2007 7:56 pm

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by FrankTC » Mon Feb 22, 2010 7:00 pm

Hoi Wouter,

How can I use this feed if my forum can only be read by logged in users? The feed doesn't work then! Is this fixable?

Greetz,
Frank
(Netherlands)

wouterv
Registered User
Posts: 265
Joined: Wed Jan 02, 2008 10:22 am
Location: The Netherlands
Name: Wouter

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by wouterv » Mon Feb 22, 2010 8:08 pm

The feed uses the user credentials as saved in a cookie. If you simply open the feed page, then the feed has Guest credentials, showing what ever is readable by Guest users as defined in your forum. Once you have logged on to the forum, the user credentials are also used by the feed (as long as the browser is not closed).
If the feed could read anything that you have reserved for registered users, that piece of security would make no sense. It is possible to modify the feed to make it read anything...if that is what you really want.
Does that explain things or do I miss something?

activityowner
Registered User
Posts: 2
Joined: Thu Feb 25, 2010 3:03 am

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by activityowner » Thu Feb 25, 2010 3:09 am

I enabled atom feed on my new site but don't see any icons being displayed for it?

http://forum.activityowner.com

So far the feed (http://forum.activityowner.com/feed.php) appears to work in my.yahoo.com and Outlook, but not in google reader/feed demon.

wouterv
Registered User
Posts: 265
Joined: Wed Jan 02, 2008 10:22 am
Location: The Netherlands
Name: Wouter

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by wouterv » Thu Feb 25, 2010 7:57 am

The feed icons show up here in Internet Explorer and Firefox (they appear near or in the address bar, not on your page, this is as intended). The feed is also valid (as supposed).
This standard phpBB 3.0.6 feed is ATOM format (the other well know format is RSS), the phpBB 3.0.6 ATOM format is not supported by all feed readers, that may cause the issue you see. Some readers (e.g the one built in my Sony TV cannot read ATOM at all).

You may try Simple Syndication: http://www.phpbb.com/community/viewtopic.php?t=1312745
All you need is to copy "syndication.php" to your server (same location as feed.php) and open it (http://forum.activityowner.com/syndication.php). Per default this generates a RSS format feed, check if that works with your applications.

activityowner
Registered User
Posts: 2
Joined: Thu Feb 25, 2010 3:03 am

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by activityowner » Fri Feb 26, 2010 2:42 am

Thanks -- I had been using chrome, which doesn't show the icons. I see them now in IE. Still no luck with Google reader seeing the feed; even with the syndication.php file.

wouterv
Registered User
Posts: 265
Joined: Wed Jan 02, 2008 10:22 am
Location: The Netherlands
Name: Wouter

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by wouterv » Fri Feb 26, 2010 7:55 am

I have no experience with Google Reader, is that a separate application installed on your PC or an online service? Does it tell you what feed formats are supposed to be supported?
Simple Syndication for sure generates valid webfeeds, strictly according the rules of W3C (see: http://validator.w3.org/feed/), your feeds are valid as well.
At least RSS format is properly supported by numerous feed readers.
Feeds from phpBB (either feed.php or syndication.php and many others) are dynamically generated by a PHP script (instead of being a straight XML file), it may be that Google Reader cannot properly handle those scripts (again, numerous feed readers have no problem with is).

The feed icon part is not within the mandatory HTML rules, but is adapted by at least Internet Explorer and Firefox.
I haven't tried Chrome for a while, the previous release had difficulties with many websites.

My policy is to first make sure that a website is properly validated by the various W3C validators (HTML/XHTML, CSS, Webfeed), then check appearance and functions with the latest Internet Explorer and Firefox releases. Webfeeds I check with Internet Explorer, Firefox and NewsFox (Firefox Add-on).

It seems you have to blame Google (Chrome not showing feed icons and Google Reader not able to handle validated webfeeds).

eboehnisch
Registered User
Posts: 9
Joined: Sat Aug 23, 2008 12:12 am

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by eboehnisch » Fri Mar 05, 2010 6:11 pm

Adding the feeds works perfectly here and they show up correctly in Safari's RSS button. However: The general feed for the board (the "board-wide feed") shows even items not visible to guests. Does anyone have an idea why? Guest on the board cannot see out internal forum but on the feed all posts show up. Only when the users clicks the article and the forum opens in her browser he get's a "not permitted" message.

User avatar
therat
Registered User
Posts: 285
Joined: Sun Apr 07, 2002 6:06 pm
Contact:

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by therat » Fri Mar 05, 2010 7:01 pm

That sounds like this bug

http://www.phpbb.com/bugs/phpbb3/58595

wouterv
Registered User
Posts: 265
Joined: Wed Jan 02, 2008 10:22 am
Location: The Netherlands
Name: Wouter

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by wouterv » Sat Mar 06, 2010 10:57 am

It did work correct in 3.0.6 and is a bug in 3.0.7.
[EDIT:]See next post
Last edited by wouterv on Sat Mar 06, 2010 11:24 am, edited 1 time in total.

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by tbackoff » Sat Mar 06, 2010 10:59 am

wouterv wrote:There is an easy fix in 3.0.7 feed.php:
Find:

Code: Select all

$forum_ids = array_keys($auth->acl_getf('f_read'));
Replace with:

Code: Select all

$forum_ids = array_keys($auth->acl_getf('f_read', true)); 
phpBB 3.0.7-PL1 released
Flying is the second best thrill to cheerleaders; being caught is the first.

eboehnisch
Registered User
Posts: 9
Joined: Sat Aug 23, 2008 12:12 am

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by eboehnisch » Mon Mar 08, 2010 10:23 am

Thank you, I wondered if I had made an upgrade mistake here … :-)

unknown2
Registered User
Posts: 676
Joined: Sat Mar 07, 2009 1:34 pm

Re: FAQ: phpBB 3.0.6 ATOM feed

Post by unknown2 » Mon Mar 08, 2010 12:03 pm

wouterv wrote:To enable the feed in its basic form, go to: ACP>General>Feed settings
Set "Enable Feeds" to "Enabled", leave all the rest default to start with and Submit the change.
If you return to the Board Index page, your browser (IE or FF) should show a selectable feed icon near the address bar which will open the feed page.
Done that
wouterv wrote:Enable feed icon with non-default style
Done that and the icon is available now.
wouterv wrote:Open feed by URL
The basic feed URL for use in a browser that support feeds or in a feed reader is:
http://yoursite.xx/phpbb/feed.php
Here is the problem. My feeds (http://www.forumdiscutivel.com/phpbb/feed.php) dont appear as feeds. The link leads me to some kind of draft of my forum :(

What should i do now? Regards

Locked

Return to “[3.0.x] Support Forum”