Opened 14 years ago

Closed 14 years ago

Last modified 22 months ago

#8551 closed patch

RSS/Atom feeds for SCUMMVM web site

Reported by: SF/musuruan Owned by: fingolfin
Priority: normal Component: Web
Keywords: Cc:
Game:

Description

This is just a quick but effective RSS 2.0 feed for the web site.

Ticket imported from: #1515575. Ticket imported from: patches/656.

Attachments (2)

rss20.php (1.7 KB ) - added by SF/musuruan 14 years ago.
PHP file to generate an RSS 2.0 feed
atom.php (2.3 KB ) - added by SF/musuruan 14 years ago.
Atom feed for SCUMMVM web site

Download all attachments as: .zip

Change History (13)

comment:1 by fingolfin, 14 years ago

Uh, www.scummvm.com is not owned by us -- www.scummvm.org is, though.

The feed validator <http://feedvalidator.org/> has no major complaints.

Personally, I'd like to see an ATOM 1.0 feed more than an RSS 2.0 feed. And maybe also additional RSS 1.0 / 0.9x feeds (considering the RSS controversy...). Ah well, but then again, I don't use newscasts at all, so that's only the geek in me speaking who prefers cleanly designed nice IETF standards over home grown controversial Userland standards *g*

comment:2 by SF/mtknight, 14 years ago

My opinion may not be worth much, but I've had some experience with RSS 1.0, and I think it's a total waste of time. It's overly complex (and hence also error-prone), ugly, and has no advantages over Atom. RSS 2.0 is probably a good idea for compatibility, but of course the inconsistencies in client implementations make it a less- than-ideal choice. As for RSS 0.9x, I've not experimented with them, but I'm told they're very similar to RSS 1.0.

I wrote a quick (and very dirty) Atom script based on the attached RSS 2.0 one (just to give an idea of how the two differ), but I'm at a loss as to how I attach it.

by SF/musuruan, 14 years ago

Attachment: rss20.php added

PHP file to generate an RSS 2.0 feed

comment:3 by SF/musuruan, 14 years ago

Max, I've uploaded a new version of the RSS 2.0 feed that links www.scummvm.org. Sorry for the mistake.

Mtknight, there is an upload form at the end of this page. Please use it. I'm really interested in the Atom feed. Otherwise please send it through e-mail.

I'm willing to make an RSS 1.0 feed too ASAP.

Right now, I use a quick and dirty cut-and-paste from index.php to read the news. Since feeds are growing, I think that a programmatic access to the news should be a better choice. I'll see what I can do.

Andrea.

comment:4 by SF/musuruan, 14 years ago

Summary: RSS 2.0 feed for SCUMMVM web siteRSS/Atom feeds for SCUMMVM web site

comment:5 by fingolfin, 14 years ago

I am afraid mtknight is not able to directly attach stuff here -- for various reasons, only the original poster and team members can attach files to a tracker item. But he could email it to you and then you attach it.

Yes, the code for reading the news should be properly encapsulated and put into a shared include file. That would also make it easier to transit to a different news storage format, should we desire to (e.g. database driven, or all in a single file, etc.).

by SF/musuruan, 14 years ago

Attachment: atom.php added

Atom feed for SCUMMVM web site

comment:6 by SF/musuruan, 14 years ago

I attached the Atom feed code provided by Mtknight. The following are his remarks.

Differences to note: * many element names are not the same (duh) * a base URI is defined for resolving relative links * entries (and the feed itself) use tag: URIs as their globally-unique ID. This form of URI isn't technically kosher (it's not approved by IETF), but it sees wide use regardless, because it's so useful. * text elements (eg. <title>, <content>) have a 'type' attribute to unambiguously establish the type of the content. * the entries are prepared before anything is output because Atom requires a feed-level last-modified time to be written down. It probably could just go after the entries since Atom doesn't ascribe any particular meaning to the order of elements, but it certainly looks better when coming out this way.

Of course it's a really quick and dirty implementation: ideally you'd also track update timestamps for entries, have caching, etc, but I'm not at all familiar with the structure of the ScummVM Web site, so I just did what I could from your RSS 2.0 implementation.

comment:7 by fingolfin, 14 years ago

So I just added RSS and Atom news feeds based on the two PHP files attached here. The two and index.php now share common code for reading the news items, too.

comment:8 by fingolfin, 14 years ago

Owner: set to fingolfin
Status: newclosed

comment:9 by SF/musuruan, 14 years ago

Please don't use feed protocol in link tags:

<link rel="alternate" type="application/atom+xml" title="ScummVM Atom news feed" href="feed://www.scummvm.org/feed-atom.php">

use http:

<link rel="alternate" type="application/atom+xml" title="ScummVM Atom news feed" href="http://www.scummvm.org/feed-atom.php">

feed protocol is not standard and is not understood by many aggregators. http should always work.

Thanks.

comment:10 by SF/mtknight, 14 years ago

Also, I made an error in my Atom script. I'm not quite sure why I didn't catch it; probably it's because I was hacking up an RSS2 file. The <link> element is an empty one; it should have an 'href' attribute that contains the URI of the link. Oops.

comment:11 by digitall, 22 months ago

Component: Web
Note: See TracTickets for help on using tickets.