Closed (won't fix)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2013 at 04:56 UTC
Updated:
12 Jun 2013 at 04:25 UTC
This is my first module, I tried to keep it simple but useful for this version. Coder said it's all ok.
http://drupal.org/sandbox/fbeaudet/1945474
git clone http://git.drupal.org/sandbox/fbeaudet/1945474.git mosaicflow
Thanks reviewers !
Comments
Comment #1
ycshen commentedIt 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:
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. You have to get a review bonus to get a review from me.
Source: http://ventral.org/pareview - PAReview.sh online service
Comment #2
fbeaudet commentedLol ! ok, yeah needs work.
Comment #3
fbeaudet commentedSO ! I learned a lot, I fixed every single error PAReview.sh gaved me. I also had to get the jquery lib out for license problem.
http://ventral.org/pareview/httpgitdrupalorgsandboxfbeaudet1945474git
http://git.drupal.org/sandbox/fbeaudet/1945474.git
Comment #4
likebtn commented1) Module required Views and Ctools modules. What about mentioning it on the project page, README.txt and in mosaicflow.info:
dependencies[] = views
dependencies[] = ctools
2) In mosaicflow.module:
After cloning repo I have /mosaicflow/css/mosaicflow.css, but I don't have /mosaicflow/jquery.mosaicflow/jquery.mosaicflow.min.js
3) Consider justifying tabs and indent in order to keep code well formatted. For example, in mosaicflow.views.inc:
replace with:
Comment #5
luco commentedhi @fbeaudet,
beautiful module! I love it.
however, if you install it without the library, it won't display any warnings. you should check for the library and warn users.
the way it works is kinda constrained: you have to have a title first and then an image... it should be more flexible than that. maybe allowing for text boxes instead of images?
and I got the following message:
Notice: Undefined index: class in include() (line 16 of /yadayada/sites/all/modules/custom/mosaicflow/theme/mosaicflow.tpl.php).cheers,
Luciano
Comment #6
arnoldbird commented@fbeaudet,
Thanks for your submission.
Manual review:
In your README.txt, you ask the user to download a jquery plugin to your module. Instead, you should use the Libraries API to provide the jquery plugin: http://drupal.org/project/libraries
There are some problems with your mosaicflow.tpl.php file. You need to use check_plain() each of the three times you print variables: $options['class'], $item[1] and $item[0]. Also, in a template it's typical to use fewer print() calls and instead present more of the HTML output outside of PHP tags, like so...
In classes, dashes are usually preferred to underscores. That is, 'mosaicflow-item' instead of 'mosaicflow__item'.
I have not looked at a lot of views plugins, but I wonder if it's typical to use the module's machine name as the theme function name, as you've done in mosaicflow.theme.inc. It seems odd to see a function whose entire name is the same as the module name. Also, your comments in that file indicate that this is a preprocess function, but I don't think that's correct. In Drupal, preprocess functions are typically functions that actually have "preprocess" in the name of the function. For example, hook_page_preprocess(). It looks like (based on this and this) a more typical name for the theme function would be views_view_mosaicflow(), and this would not be considered a preprocess function.
The name of your class seems non-standard. You have...
class ViewsPluginStyleMosaicflow extends views_plugin_style...when I think the norm is...
class views_plugin_mosaicflow extends views_plugin_styleOf course, the camelCase approach will work, but I think you should follow the example of the class you are extending.
As suggested earlier in the thread, you should add the ctools dependency in your info file:
dependencies[] = ctools
Comment #7
arnoldbird commentedChanging to "needs work" based on my manual review above.
Comment #8
arnoldbird commentedI'm actually not sure about this. It may be that the variables are safe enough given where they are coming from? Sorry I can't be more decisive about this. I'm having trouble finding examples of views plugins.
Comment #9
arnoldbird commentedThis looks to be a good example of a module that implements a jquery plugin as a library: http://drupal.org/project/equalheights
Comment #10
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application.
I'm a robot and this is an automated message from Project Applications Scraper.