Feed publishing, and the RSS format in particular, is currently tightly coupled with the node module. Because of this supporting Atom or extending feed functionality with custom modules isn't as clean as it should be. For example, adding a name-space to a node feed requires replacing default feeds with custom feeds instead of simply "theming" the output of feeds as you would do with every other form of content display. Publishing only Atom feeds (and disabling RSS) is impossible. I would like to see feed publishing become more generic and more extensible in the core and I believe there has been discussion around this in the past. Ideally, feed publishing would be a generic module or api which would support the following needs. 1. Multiple arbitrary feed formats (RSS, Atom) with a default 2. Custom name-spaces and elements (possibly via themes or hooks) 3. Publish comment feeds or any other arbitrary content (watchdog events, users, etc.) 4. The ability to provide a feed of any arbitrary set of content (e.g., view, node-queue) 5. Optimize publishing for very high traffic feeds (e.g., caching or saving as static xml file) 6. The ability to disable feeds It is currently possibly to cobble together most of the above functionality with views.module, commentrss.module, and atom.module but the solution is sub-optimal for many reasons. I recently started creating a feed.module against HEAD with the hope that it could turn into a core module which would make feed publishing more flexible and collect all feed formatting and publishing code and eliminate the RSS publishing functionality in node.module. However, since 6.x was just frozen there's probably no hope of introducing this now but I'd still like to re-float the idea and get some feedback. In particular, I'm curious if anyone else is already working on such a project, if there are any side-effects of separating feed publishing from node.module that I haven't considered, or if this problem might be better approached using views as the complete solution (not really viable since views is not a core module). Please ignore the fact that this can't be implemented for 6.x. As an example of an issue I have faced, feedburner.com adds a "number of comments for this entry" if the feed includes the "wfw:commentsRss" element pointing to the comment feed for the entry. I have modified the commentrss.module to add the element to the node feed but there is no way to add the "wfw" name-space to the node feed without replacing it with a custom feed so I had to add the name-space to each instance of the "commentRss" element. Cheers, Chris Cook
it would be nice to tidy this up as you suggest. have a look at the output formats issue: http://drupal.org/node/145551. you might also take a look at Views style plugins since Views is what generates node lists on most sites these days. beerfan wrote:
Feed publishing, and the RSS format in particular, is currently tightly coupled with the node module. Because of this supporting Atom or extending feed functionality with custom modules isn't as clean as it should be. For example, adding a name-space to a node feed requires replacing default feeds with custom feeds instead of simply "theming" the output of feeds as you would do with every other form of content display. Publishing only Atom feeds (and disabling RSS) is impossible. I would like to see feed publishing become more generic and more extensible in the core and I believe there has been discussion around this in the past.
Ideally, feed publishing would be a generic module or api which would support the following needs.
1. Multiple arbitrary feed formats (RSS, Atom) with a default 2. Custom name-spaces and elements (possibly via themes or hooks) 3. Publish comment feeds or any other arbitrary content (watchdog events, users, etc.) 4. The ability to provide a feed of any arbitrary set of content (e.g., view, node-queue) 5. Optimize publishing for very high traffic feeds (e.g., caching or saving as static xml file) 6. The ability to disable feeds
It is currently possibly to cobble together most of the above functionality with views.module, commentrss.module, and atom.module but the solution is sub-optimal for many reasons.
I recently started creating a feed.module against HEAD with the hope that it could turn into a core module which would make feed publishing more flexible and collect all feed formatting and publishing code and eliminate the RSS publishing functionality in node.module. However, since 6.x was just frozen there's probably no hope of introducing this now but I'd still like to re-float the idea and get some feedback. In particular, I'm curious if anyone else is already working on such a project, if there are any side-effects of separating feed publishing from node.module that I haven't considered, or if this problem might be better approached using views as the complete solution (not really viable since views is not a core module). Please ignore the fact that this can't be implemented for 6.x.
As an example of an issue I have faced, feedburner.com adds a "number of comments for this entry" if the feed includes the "wfw:commentsRss" element pointing to the comment feed for the entry. I have modified the commentrss.module to add the element to the node feed but there is no way to add the "wfw" name-space to the node feed without replacing it with a custom feed so I had to add the name-space to each instance of the "commentRss" element.
Cheers, Chris Cook
On 7/2/07, Moshe Weitzman <weitzman@tejasa.com> wrote:
it would be nice to tidy this up as you suggest. have a look at the output formats issue: http://drupal.org/node/145551.
This patch sounds like a reasonable way forward. It would have been nice if that patch would start with migrating existing themes (and non-themes like feeds) instead of starting with adding new presentations (actually, it may since I'm not up to date with theme changes in 6.x and didn't study it too long but it appeared to focus only on new JSON output). That approach would probably make it more likely to pick up steam. I'll review it and see where it's at.
you might also take a look at Views style plugins since Views is what generates node lists on most sites these days.
Sure, I realize I can accomplish what I need with views, or some combination of other modules. And when views is a core module and everything uses it that will be a no-brainer but until then I was trying to think of the best approach for making feed presentation more modular. Cheers, Chris
Op dinsdag 03 juli 2007, schreef beerfan:
Because of this supporting Atom or extending feed functionality with custom modules isn't as clean as it should be. For example, adding a name-space to a node feed requires replacing default feeds with custom feeds instead of simply "theming" the output of feeds as you would do with every other form of content display.
I don't think you need to put "Theming" between quotes. A feed shouls be pushed trough the theme layer (in addition to you excellent suggestions). IMO an RSS feed is just another way of looking at your content, so I really see no reason why for this way of looking at content we chose to circumvent the theme. FYR: this is now a "proper" MVC system handles feeds: http://bakery.cakephp.org/articles/view/rss-feed-them-cake or for the more Ruby savvy: http://www.paulsturgess.co.uk/articles/show/13-creating-an-rss-feed-in-ruby-... (its not that obvious because the XML class is used instead of writing plaintext XML, like the cake example does) Both build the XML in the theme layer. Which is Good [tm]. Bèr -- Drupal, Ruby on Rails and Joomla! development: webschuur.com | Drupal hosting: www.sympal.nl
participants (3)
-
beerfan -
Bèr Kessels -
Moshe Weitzman