[development] RSS Feed referencing a userreference as the item author

ekes ekes at aktivix.org
Sun Jul 11 14:14:29 UTC 2010

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.



More information about the development mailing list