This module provides an additional Block and a Menu Page, named Moodboard.
Using image fields it builds a grid of images that cycles via ajax in the time.
Tested with Drupal 7.2

Some Features are

  • Predefined grid sizes
  • Different display effects
  • Predefined image styles
  • If imagecache actions is enabled, borders are added to items

Demonstration: http://mood.fabforge.ch/
Sandbox: http://drupal.org/sandbox/foxfabi/1191892

CommentFileSizeAuthor
#13 drupalcs-result.txt1.92 KBklausi

Comments

alexreinhart’s picture

Status: Needs review » Needs work

I've taken a brief look through the module. Here are some comments:

  • Your README should be named README.txt and formatted according to the documentation guidelines -- particularly, it should not be in HTML.
  • Rather than moodboard_check_auth, you can use user_is_anonymous and user_access to check permissions.
  • In moodboard_menu, you don't need to check_plain strings like "moodboard settings" which you know do not contain any HTML entities. Furthermore, the "title" attribute in the menu arrays should not be run through t(), since that is done automatically by Drupal.
  • Anything which outputs raw HTML, like moodboard_build_board, should use check_plain() on its inputs to ensure no unwanted HTML is injected.
  • Your code sometimes switches between 2-space and 4-space indentation. (In moodboard_build_board.inc line 33, for example.) You should standardize on 2-space indentation.
  • Your .info file should not declare a module version, since that's done automatically by the drupal.org packaging scripts.
  • You don't need to include moodboard.install if it does not do anything.
  • In moodboard.admin.inc, using the system_settings_form #theme will automatically do variable_set for you using the name of the form elements. You should not have to add a custom submit function.

That's all I've had time for now, but I hope that'll help you improve your module further. Once you've fixed these issues, set the status here back to "needs review" and someone will take another look through.

foxfabi’s picture

thank you for the patience ;) i will move forward

foxfabi’s picture

think I've fixed all mentioned issues ... i've sent the changes to git
the changes in moodboard.admin.inc, using the system_settings_form #theme did not succeed ...
may need a bit time ;)

foxfabi’s picture

Status: Needs work » Needs review

i hope you find time to review the fixes.

klausi’s picture

Status: Needs review » Needs work

* "7.x-1.0" should not be a git branch, it should be a git tag. See this to properly name your branches: http://drupal.org/node/1015226
* don't use "version" in your info file, drupal.org packaging will add it automatically
* module file: @file doc block is missing, see http://drupal.org/node/1354#files
* "Implementation of hook_theme()" should be "Implements hook_theme().", see http://drupal.org/node/1354#hookimpl
* moodboard_init(): this function is empty, remove it.
* moodboard_block_view(): don't use a switch() if you have only one case. Use an if statement instaed.
* "#moodboard_image_add_styles_desaturate(&$styles, 'moodLittleHigh');" comments starting with "#" are discouraged, use '//' instead
* moodboard_image_add_styles_desaturate(): indentation errors in the function body.
* moodboard_page(): there should not be an empty line between function and doc block.
* "class moodimage": class names should be prefixed with your module name. Class names should be camel case, see http://drupal.org/node/608152
* files containing classes should be listet in the info file for autoloading
* why are there so many include files?

foxfabi’s picture

Status: Needs work » Needs review

hello again, as you see i'm not a real programmer ;)
i removed the theming hook while no theming is available and fixed the issues posted by klausi.
hope somebody find again time to push this module forward so finally it will be used by someone else.

patrickd’s picture

Status: Needs review » Needs work

It appears you are working in a wrong 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:

  • ./includes/moodboard_slideshow_get_settings.inc: The description on the line after the @param/@return documentation is either missing or not formatted correctly. See http://drupal.org/node/1354#functions
    8- *
    
  • Remove all old CVS $Id tags, they are not needed anymore.
    css/moodboard.css:1:/* $Id$ */
    js/moodboard.js:1:/* $Id$ */
    
  • All text files should end in a single newline (\n). See http://drupal.org/node/318#indenting
    ./moodboard.admin.inc ./includes/moodboard_build_board.inc ./includes/moodboard_show_board.inc ./includes/moodboard_get_gridsize.inc ./includes/moodboard_slideshow_get_settings.inc ./includes/moodboard_get_imagecache_presets.inc ./includes/moodboard_large_slots.inc ./moodboard.pages.inc ./README.txt ./moodboard_userpoints.inc ./moodboard.module
    

This automated report was generated with PAReview.sh, your friendly project application review script. Go and review some other project applications, so we can get back to yours sooner.

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

foxfabi’s picture

Status: Needs work » Needs review

thanks for your time .. indenting and params are fixed. also i think the git branch naming convention should be fine now. may somebody give it a try again?

patrickd’s picture

foxfabi’s picture

that's a service :)

patrickd’s picture

Status: Needs work » Needs review

Switched back to needs review, so in-depth reviews won't be blocked by coding standart issues.

foxfabi’s picture

i fixed the coding standards issues. i'm sorry for the time you spend check that, now i'm using http://ventral.org/pareview/

actually i'm fighting with image style default presets and alter hooks while the styles do not get stored. i had to manually override the style. may be usefull to check the settings but it does not work out of the box with the default styles setting. i think it's related to definecanvas ...

klausi’s picture

Status: Needs review » Needs work
StatusFileSize
new1.92 KB

Review of the 7.x-1.x branch:

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. Go and review some other project applications, so we can get back to yours sooner.

manual review:

  • why are there so many include files?
  • "t('Failed to copy file:') . ' ' . $previewfile;": do not concatenate translated string like this, use placeholders instead.
  • "drupal_set_message($message = t('The moodboard module was successfully enabled.'), $type = 'status');": the variables $message and $type are not needed here.
  • moodboard.js: "Drupal.behaviors.mySpecialFeature": you should use your module name here.
  • do not load all include files every time the module file is included. Include them when they are actually needed.
  • "if (user_access('access content')) {": you should use your own permission here
  • Permission "access board": better call it "access moodboard".
  • moodboard_menu(): "'access callback' => 'user_access',": user_access is the default, so you don't have to specify it.
foxfabi’s picture

Status: Needs work » Closed (fixed)

i think we can close this issue .. the image matrix module let you build also moodboards..

patrickd’s picture

Status: Closed (fixed) » Closed (duplicate)

Ohkay! Thanks for this catch :)

We would love to see you joining forces and concentrate all power on enhancing the existing module. (If the existing module is abandoned, please think about taking it over).

feel free to try again another time

avpaderno’s picture

Title: Moodboard » [D7] Moodboard
Issue summary: View changes
Status: Closed (duplicate) » Closed (won't fix)