I wanted a content:encoded item for my feeds so I made a small extension module to implement it. Feedback would be appreciated: http://github.com/guictx/views_rss_content

Comments

Status:Needs review» Needs work

Thanks Guilherme. Essentially it looks good, few quick thoughts though after looking at the code (haven't tested it yet):

  • none of the Views RSS submodules do not use CDATA-escaping, also, new dev versions of Views RSS module do not use its own entity encoding anymore either (feed element array is passed to format_xml_elements(), which takes care of this automatically) - therefore I would remove views_rss_content_views_rss_item_content() function and preprocess functions key from views_rss_content_views_rss_item_elements() definition;
  • you can also remove title key from content:encoded element definition - it will be automatically extracted from element name;
  • you could add help key with value either http://www.feedforall.com/content.htm or http://web.resource.org/rss/1.0/modules/content/ (the latter is more extensive, I would go with the former though I think, as it is more clear and easier to read, especially in RSS context);
  • finally, mentioned Content Namespace Extension says that <content:encoded> element could be added both to the <channel> and the <item> sections - so perhaps it would be good to implement hook_views_rss_channel_elements() too?

Don't you want to submit this module to d.o yourself?

Status:Needs work» Needs review

Thank you so much for the review Maciej. I followed your suggestions and changed:

1. Removed views_rss_content_views_rss_item_content() - latest dev correctly encodes the element, so no need for CDATA-escaping;
2. Removed title key;
3. Added help key pointing to http://www.feedforall.com/content.htm;
4. Added views_rss_rewrite_relative_paths as a preprocess function to make sure links in content:encoded are absolute.

Regarding the implementation of hook_views_rss_channel_elements() I'm not so sure. The spec is a little bit ambiguous regarding <channel> and the RSS Best Practices document doesn't mention it. What do you think about it?

And I'll go ahead and submit the module.

Thanks again!

Status:Needs review» Needs work

Just given it a quick test ride and all seems to be working fine. Coder does not report any issues either. Please just remove LICENSE.txt file from the repo (it will be added automatically by d.o) and rename README.md to README.txt (perhaps wrapping its long lines at the same time) and you're good to go! (At least based on what I can see.)

I finally got around to submit the project application for this: http://drupal.org/node/1626446.

Guilherme, I have read the comments in the Project Applications queue, and - if you want - I could create a new full project from this and make you a co-maintainer?

OK, lets do that!

Thanks.

Status:Needs work» Fixed

http://drupal.org/project/views_rss_content - you have empty project and all permissions. Into your hands now!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.