PHPJavascript

Web Development Guide – My Personal Library of Tutorials and Scripts

Drupal rss remove author name

March25

The rss being generated has by default node title, author name and time. Now these rss items can be controlled on the html level (eg http://www.emirateslitfest.com/blog/feed) by manipulating the node.tpl files (use node-blog.tpl for content type blog, node-page.tpl for content type page and so on so forth).

But when we view the rss feeds in feed readers like google reader etc the changes made by node.tpl is not reflected. The solution for this is to hack the view-rss.module file (modules/views/view-rss.module).

Find line

array(’key’ => ‘dc:creator’, ‘value’ => $item->name)

replace with

array(’key’ => ‘dc:creator’, ‘value’ => ‘ ‘)

This will prevent the author name to be generated in xml file hence preventing feed readers from picking it.

Note: If you need to add cck fields in your rss feed use comtemplate. This even help to theme the rss field along with the teaser and body display.

posted under Drupal
One Comment to

“Drupal rss remove author name”

  1. On July 12th, 2010 at 1:40 pm Alex Says:

    I had the same problem but there was no such file in the drupal directory (view-rss.module).

    However, there were several other module files under the views module that I tampered with the same way that you did (views_plugin_row_node_rss.inc, views_plugin_row_comment_rss.inc, views_plugin_row_aggregator_rss.inc).

    This solved my problem in all the pages EXCEPT the root one. So when i go to /drupal/rss.xml it still displays the author name (while /drupal/blog/rss.xml works fine). Any clue will be greatly appreciated.

Email will not be published

Website example

Your Comment:

 

12,958 spam comments
blocked by
Akismet