[RFC] Split metadata in Atom feed's "content" data

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
darkdud3
Registered User
Posts: 3
Joined: Fri Dec 30, 2011 11:28 pm

[RFC] Split metadata in Atom feed's "content" data

Post by darkdud3 »

I propose a simple change to the Atom feed generated by phpBB. Currently the content data for a post whose body reads "Blah blah blah blah blah" looks like this:

Code: Select all

<content type="html" xml:base=""><![CDATA[
Blah blah blah blah blah.<p>Statistics: Posted by <a href="">Author</a> ?Fri Dec 30, 2011 6:37 pm ?Replies 0 ?Views 0</p><hr />
]]></content>
Would it not make more sense to have just the post body (in the example above, just "blah blah blah blah blah"), and put everything else (Statistics... etc) into another data point?

I found out while trying to write code that syndicates from the phpBB Atom feeds that it's needlessly inconvenient to have the "Statistics..." etc as part of <content>. The author name and date, for example, are already provided by <author> and <published>, and so makes it redundant (although the link to the author's profile is not provided in <author>). And if one wants to move this "Statistics..." stuff to the top of the post, or manipulate it in any other way apart from the body of the post content, one would have to split <content> with one's own code which I think is unnecessarily inconvenient.

I don't see any reason why the metadata should be part of <content>.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Split metadata in Atom feed's "content" data

Post by Oleg »

Where do you propose putting the metadata?

darkdud3
Registered User
Posts: 3
Joined: Fri Dec 30, 2011 11:28 pm

Re: [RFC] Split metadata in Atom feed's "content" data

Post by darkdud3 »

Put replies in a <replies> tag and views in a <views> tag, as children of each <entry>?

If I'm violating some Atom standard, then please excuse my ignorance. I'm not too familiar with it. But it seems to go against a more general philosophy to have the metadata as an unmarked part of the data object itself.

Oh and by the way, I think the link to the author's profile is very useful indeed. Currently it is as I described: part of <content>. If the metadata does get removed from <content>, I think it would be a good idea to put the link to the post author's profile as a child of <author>, sibling to <name>.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1904
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [RFC] Split metadata in Atom feed's "content" data

Post by DavidIQ »

According to this there is a contributor tag that could be used to split that out. There are probably other usable tags that could/should be used instead.
Image

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC] Split metadata in Atom feed's "content" data

Post by Oleg »

I don't know anything about Atom, that is why I asked. If there are tags we can use we should definitely investigate using them.

darkdud3
Registered User
Posts: 3
Joined: Fri Dec 30, 2011 11:28 pm

Re: [RFC] Split metadata in Atom feed's "content" data

Post by darkdud3 »

The Atom Syndication Format wrote:6.4. Extension Elements

Atom allows foreign markup anywhere in an Atom document, except where
it is explicitly forbidden. Child elements of atom:entry, atom:feed,
atom:source, and Person constructs are considered Metadata elements
and are described below. Child elements of Person constructs are
considered to apply to the construct. The role of other foreign
markup is undefined by this specification.
I think this means we could simply add tags such as <replies> as children to <entry>.

<contributor> works too I suppose. Both are much better than what we have right now.

Post Reply