RSS Feed referencing a userreference as the item author
I have a bit of a problem with something I am trying to implement on a client site, and I was hoping someone would be able to suggest a decent way of implementing this. The site is a magazine / news site. The site has articles held in an 'article' content type, where the article authors are held in a multi-value userreference field. The actual node author is the editor who created the content on the site. Now we are trying to set up RSS feeds for the information, and the fact that we are storing authors in a userreference field is a bit of a stumbling block. We currently are trying to work a solution with views_rss (http://www.drupal.org/project/views_rss), but it looks like it doesn't handle userreference fields at all. Has anyone tried to do this before? What's the best way to get it done? If absolutely necessary, I could create a page callback to generate the RSS manually, however, there are probably 10-15 different feeds this would need to be done for. I appreciate any and all comments. Brian
On 09/07/10 22:45, Brian Vuyk wrote:
The site is a magazine / news site. The site has articles held in an 'article' content type, where the article authors are held in a multi-value userreference field. The actual node author is the editor who created the content on the site.
If it's site wide, or pretty much site wide, and you are happy with the grain of control that you get from the CCK settings on content type for what is in RSS. I'd use hook_nodeapi($op='rss item', &$item) - taking the item (node) by reference and changing $item->name. If you want finer control in views, more than per content type per field, this will start getting complicated. Extending views_rss would be the way probably. Note also with views even with the node row style, changing the $item by reference on the hook doesn't work as you would expect... unless you hack it a little bit... I mean to post a patch, I will. At the moment views creates a $item as stdClass and adds a few items rather than passing everything it has already got for the 'node' object like the node module does. Cheers, ekes
participants (2)
-
Brian Vuyk -
ekes