I wrapped up some feed formatters in a module to help make iTunes compatible feeds for Drupal 7. I got the idea when looking at the rss_field_formatters module. This code of this module is heavily based on rss_field_formatters.

I'm already using this module in 2 production sites http://cloudplumbing.com and http://allaware.com.

http://drupal.org/sandbox/RyanParsley/1376202

git clone --branch master http://git.drupal.org/sandbox/RyanParsley/1376202.git

CommentFileSizeAuthor
#1 drupalcs-result.txt6.25 KBtargoo

Comments

targoo’s picture

Status: Needs review » Needs work
StatusFileSize
new6.25 KB

It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
Review of the master branch:

  • README.txt is missing, see the guidelines for in-project documentation.
  • ./rss_itunes_subtitle.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function rss_itunes_subtitle_field_formatter_info() {
    function rss_itunes_subtitle_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
    
  • ./rss_itunes_keywords.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function rss_itunes_keywords_field_formatter_info() {
    function rss_itunes_keywords_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
    
  • ./rss_itunes_explicit.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function rss_itunes_explicit_field_formatter_info() {
    function rss_itunes_explicit_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
    
  • ./rss_itunes_summary.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function rss_itunes_summary_field_formatter_info() {
    function rss_itunes_summary_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
    
  • ./rss_itunes_author.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function rss_itunes_author_field_formatter_info() {
    function rss_itunes_author_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
    
  • Bad line endings were found, always use unix style terminators. See http://drupal.org/coding-standards#indenting
    ./rss_itunes_explicit.info:   ASCII text, with CRLF line terminators
    ./rss_itunes_image.info:      ASCII text, with CRLF line terminators
    ./rss_itunes_author.info:     ASCII text, with CRLF line terminators
    ./rss_itunes_subtitle.info:   ASCII text, with CRLF line terminators
    ./rss_itunes_summary.info:    ASCII text, with CRLF line terminators
    ./rss_itunes_keywords.info:   ASCII text, with CRLF line terminators
    rss_itunes_author.info
    rss_itunes_author.module
    rss_itunes_explicit.info
    rss_itunes_explicit.module
    rss_itunes_image.info
    rss_itunes_image.module
    rss_itunes_keywords.info
    rss_itunes_keywords.module
    rss_itunes_subtitle.info
    rss_itunes_subtitle.module
    rss_itunes_summary.info
    rss_itunes_summary.module
    
  • Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards). See attachment.

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.

Source: http://ventral.org/pareview - PAReview.sh online service

patrickd’s picture

welcome,

while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools, as pointed out above.
At least moving to a version specific branch should be done before switching back to "needs review".

You can also get a review bonus and we will come back to your application sooner.

regards

migmedia’s picture

You add a little more explaining to your project-page:

Are there dependencies between the different modules?
Why is every feed-tag a single module, wouldn't it be cleaner to combine them in a single or core-module and extentions?

Micha

RyanParsley’s picture

Micha,
It made sense to me to have each tag be a separate because they're optional from Apple's perspective and enabling them fills up the "Manage Display" "Format" select list. Separate modules seemed like the way to let users keep that list uncluttered from elements they don't plan to use. I'm not convinced this is the best approach... but that's what I was thinking at the time.

I'll get on the rest of the changes soon. I only just realized these 3 issues exist. I must need to adjust my email preferences so I get notified.

Since writing this module I discovered http://drupal.org/project/views_rss_itunes. I'm concerned that mine is redundant. The main difference between the two is mine does not depend on views_rss and works with the way core manipulates feeds. A nice thing about choosing Views RSS is it allows for adding all the nice iTunes elements to the feed itself. Using my module, I did this via a .tpl.php. Do you think both need to exist?

Thanks,
Ryan

migmedia’s picture

@Ryan thank you for your efforts.

The way creating feeds by the template-system may be more customizable for the pros, but imho the beginner (as I) would prefere the views_rss_tunes way.
By the way, they have created a nice documentation, what would be a lot of work for a module like yours.

Micha

mitchell’s picture

Status: Needs work » Postponed (maintainer needs more info)

Hi, RyanParsley. This is a very nice contribution. Thanks for submitting it for review as your first full project!

Here are the issues I found with your code:
* Your project is named itunes_feed_formatters, yet your module namespace is rss_itunes_*
* You're using separate modules for each field formatter. These can all be merged into a single module, and preferably module-name_views.inc
* Your project name doesn't use the views_ namespace.
* An view export based on your code would be tremendously helpful for review. (Also a similar one of the other module for comparison wouldn't hurt.)

Views RSS iTunes hasn't fully taken off yet, so I recommend you either continue working on this code or help improve that project. Do either of those options appeal to you? How would you like to move forward?

klausi’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Closing due to lack of activity. Feel free to reopen if you are still working on this application.