What is it?
This Drupal 7 module allows you to integrate +Gallery into your site.
+Gallery grabs all your albums and images from an online source or feed and display them on your site or within individual blog posts. It allows you to browse albums and galleries, or display just one Gallery at a time. Take a photo with your iphone, post to Facebook, Instagram, Flickr or Google Plus and it is automatically added to your site as well.
+Gallery is also built with Responsive Web Design in mind so almost wherever you put it, it scales automatically and plays nice. It shines and 960px and at 320px and hopefully everywhere in between. Not following me? Please Read here. +Gallery is designed for todays touch devices. Using your iPad, iPhone or Android devices the zoom level allows you to swipe through all the gallery images in addition to using the standard UI elements.
Git
git clone --branch 7.x-1.x SeppeMagiels@git.drupal.org:sandbox/SeppeMagiels/1942084.git plus_gallery
Comments
Comment #1
PA robot commentedWe are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and put yourself on the PAReview: review bonus high priority list. Then I'll take a look at your project right away :-)
Comment #2
he0x410 commentedHello,
Automated code review shows nothing :)
http://ventral.org/pareview/httpgitdrupalorgsandboxseppemagiels1942084git
From manual review:
Generally code looks very perfect!
Just found couple things:
1. plus_gallery.module@530 | $lastpart unused variable
2. You ask to "Go to http://plusgallery.net and download the latest version. Then uncompress
the contents of the "plusgallery" directory of the downloaded file to this
folder (modules/plus_gallery/plusgallery)."
I suggest to use sites/all/library folder for external libraries.
Nice module. Good luck!
Comment #3
Seppe Magiels commentedHi artem,
Thanks for the review!
1) Removed unused variable.
2) It is already possible to place it into sites/all/library with the imagepath setting on the config page. But I updated the default path to sites/all/library/plusgallery and updated the README.txt.
In the meantime I also added two more attributes for the gallery. And the library itself has been updated so the issues has been fixed as well.
Comment #3.0
Seppe Magiels commented- Removed known issues (fixed).
- Added reviews.
Comment #4
Seppe Magiels commentedAdding the PAReview: review bonus tag.
Comment #5
lorenlang commentedAs already mentioned, the automatic review shows no errors.
In my manual review, I also didn't see anything problematic. The code looks really clean and well-written. The only thing I might mention is a really minor inconsistency. You separate your markup & calls to t() and concatenate them, which is very helpful to translators. In some places, though, you have a colon outside the t() call (plus_gallery.module, lines 120-121) and in others, you have them inside (plus_gallery.module, lines 73-79). Maybe that was intentional but I figured I'd point it out. Not a major deal at all, though.
Comment #6
Seppe Magiels commentedHi llang,
Thanks for your review, really appreciate it.
I have to say, you have a great eye for detail! The colon "issue" is completely unintentionally. I will move them outside of the t() calls, unless inside is preferred?
Greetings!
Comment #7
lorenlang commentedHey, those nits aren't gonna pick themselves, right? It's what I do. :-)
--llang
Comment #8
20th commentedOverall, good job. Code is generally well written and easy to read. Few things to take care of:
Can the value of $title be changed by the site administrator or simple user? In that case, you should remove the t() call from this line, because user-defined strings should not be translated with t().
In any case, this usage of t() is wrong. You'd want to read its documentation for details.
Comment #9
Seppe Magiels commentedHi 20th,
Thanks for your review!
I took a look at the jQuery Update module and it, indeed, solves the replacement of jQuery, but because of the version (1.7) the #states attribute doesn't work anymore and the field isn't completely accessible. (#1815896: jQuery 1.7 and 1.8 breaks conditional #states forms) So for now I kept the code as it was, just to keep it working. I will update it as soon as the issue has been resolved. Or do you know of a better alternative?
I will integrate the Libraries module in the near future. (probably sometime next week)
Now all the quotes should be single, except for strings in the t() function that needed escaping of a single quote, those are double.
The other issues should be fixed, hopefully correctly. ;)
Greetings!
PS: @llang definitely! ;)
Comment #10
Seppe Magiels commentedHi 20th,
I fixed all the issues you mentioned, except for the replacement of jQuery for the reason I mentioned above.
Comment #11
whastings commentedI've reviewed the code for this module. It adheres to Drupal's coding and commenting standards, and is clean and well-structured. I particularly enjoyed the in-depth integration with the Field system and the thorough error handling. Also, I think the integration with outside photo services will make it very popular. I only located a few minor problems:
README.TXT
You instruct the user to download +Gallery to sites/all/library, when I think sites/all/libraries is the correct name for integration with Libraries API.
plus_gallery.install
hook_requirements() implementation: Items in your $requirements array should have a key set, as in
requirements['key'] = array(...plus_gallery_update_7100()
You're concatenating the return value of _field_sql_storage_tablename($field) and _field_sql_storage_revision_tablename($field) with $field['field_name'] on line 169. I think the return values of these functions already includes the field's name.
All hook_update_N() functions should take the parameter &$sandbox, though I don't think you'll need to actually use it.
plus_gallery.module
Line 737:
$options[PLUS_GALLERY_GOOGLEPLUS] = t('Goolge+');'Google+' is misspelled
plus_gallery_field_formatter_view() line 566:
I see that for each delta of the field you're adding inline JavaScript that defines the attach function for Drupal.behaviors.plusGallery. Won't each iteration overwrite the previous, meaning only the last delta will actually work? Even if not, I think a better approach would be to add
$(".plusgallery-' . $delta . '", context).plusGallery();for each delta to a variable, then have one call to drupal_add_js after the foreach. I'm thinking something like:Comment #12
Seppe Magiels commentedHi whastings,
Thanks for your review, really appreciate it!
All the issues you described should be fixed.
Greetings!
Comment #13
klausimanual review:
But otherwise this looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Assigning to jthorson as he might have time to take a final look at this.
Comment #14
Seppe Magiels commentedHi klausi,
Thanks for your review!
I moved the field hooks to the plus_gallery.field.inc file. The permission hook has been removed, forgot to remove it before. ;)
Comment #14.0
Seppe Magiels commentedAdded another review
Comment #14.1
Seppe Magiels commentedAdded more reviews
Comment #15
Seppe Magiels commentedAdded the PAReview: review bonus tag.
Comment #16
klausino objections for more than a week, so ...
Thanks for your contribution, Seppe Magiels!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #17.0
(not verified) commentedAdded another review