Hello
Hope you are doing well.
I have posted my module on drupal.org sandbox.
Description:-
This module provides facility to crop single image in multiple dimensions. User can crop various part of singe image based on dimensions configured from back-end. Path for each cropped image is stored in one hidden field, we can fetch each cropped image for node/term using the hidden fields. In this way we can display different portions of image at each place holder in fronted.
Project link:-
https://drupal.org/sandbox/vishalshah9/2211213
Git repository Link: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/vishalshah9/2211213.git
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | Crop Image localhost.png | 22.42 KB | prashant.c |
Comments
Comment #1
vishals_clarion commentedComment #2
PA robot commentedWe are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
plazik commentedQuick review:
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.
It seems like you´ve a misnamed branch/tag created in your repository, please have a look at the release naming conventions.
Please remove the LICENSE.txt file. Drupal.org will add the appropriate version automatically during packaging so your repository should not include it.
jquery.imgareaselect.js appears to be 3rd party code. 3rd party code is not generally allowed on Drupal.org and should be deleted. This policy is described in the getting involved handbook. It also appears in the terms and conditions you agreed to when you signed up for Git access, which you may want to re-read, to be sure you´re not violating other terms.
The Libraries API module is a recommended method for adding 3rd party dependencies without directly including the code on Drupal.org.
Comment #4
vishals_clarion commentedHi
I have created the branch on the git and remove the master branch from git.
Git repository Link:-
git clone --branch 7.x-1.x http://drupal.org:sandbox/vishalshah9/2211213.git
http://drupalcode.org/sandbox/vishalshah9/2211213.git
And also updated the code according to above message.
Please review the code and provide proper feedback.
Comment #5
klausiComment #6
klausiThere is a git tag that has the same name as the branch 7.x-1.x. Make sure to remove this tag to avoid confusion.
Comment #7
vishals_clarion commentedI am removed the same tag name as branch and created new tag as name "7.x-1.0".
Please check it.
Comment #8
plazik commentedMajor status is only for applications with a status of needs review that have been awaiting response from a reviewer for 2+ weeks https://drupal.org/node/539608.
There are many errors in code http://pareview.sh/pareview/httpgitdrupalorgsandboxvishalshah92211213git.
Comment #9
vishals_clarion commentedWe've rectified all the warnings given by Coder Sniffer module. Please verify on http://pareview.sh/pareview/httpgitdrupalorgsandboxvishalshah92211213git.
Please share your suggestions/feedback for this module.
Comment #10
draenen commentedManual Review
croptool.field.admin.inc:11 - Custom function should be documented according to https://drupal.org/coding-standards/docs#drupal
croptool.field.admin.inc:12 - It is safer to make a copy of global variables ($base_url = $GLOBALS['base_url']) to avoid accidentally overwriting or changing the global value.
croptool.field.admin.inc:46,698,705,712,785,841 - Use placeholders for variables passed to db_query(). See https://drupal.org/node/310072
croptool.field.admin.inc:599 - Use $form_state['redirect'] instead of drupal_goto()
croptool.field.admin.inc: - Use placeholders for variables passed to db_query(). See https://drupal.org/node/310072
croptool.module:5 - @file doc. This is not the installation file.
croptool.module:115,116,117 - don't include files from hook_menu. These should be defined in your .info file. See https://drupal.org/node/542202#files
Comment #11
vishals_clarion commentedWe've rectified all the issues according to Manual Review.
Please share your suggestions/feedback for this module.
Comment #12
mraichelson commentedIs it possible to get an explanation of how this differs from other image crop/focus modules that are already in circulation?
Is this functionality that should be considered for addition to an existing module?
See: Comparison of image cropping and resizing modules.
Comment #13
mraichelson commentedAs noted previously: Major priority is only for projects that have been waiting for 2 weeks or more for feedback.
Comment #14
vishals_clarion commentedHi
Thanks for sharing your feedback with us. Below are major differences of this module :
1. This module allows cropping of single image in multiple dimensions. Admin/user needs to upload image only once and he/she can crop different portions of that image.
2. Admin can configure multiple crop dimensions for any image field for any content type & taxonomy. So we can have different cropping configuration for each fields and nodes/taxonomy.
3. This module also provides auto cropping of images based on configured dimensions. If user simply add content without cropping of uploaded image, that image will automatically cropped on content save action.
4. There is also one separate interface given to auto crop images for already added content. i.e. after adding some nodes if admin creates new crop tab, from this interface he can auto crop images for already added contents.
5. For each crop dimension/tab two hidden fields are generated for node to store cropped image location and dimension. Benefit of this approach is that, in frontend we can render cropped image with required dimensions at various location.
Comment #15
vishals_clarion commentedPlease share your valuable feedback, so that we can do changes accordingly if needed.
Comment #16
vishals_clarion commentedPlease share your valuable feedback, so that we can do changes accordingly if needed.
Comment #17
inders commentedCoder module is reporting few issue. You can fix those.
https://drupal.org/project/coder
Another note:-
you are using
variable_get('file_croptool_path')it was defined in install file :
variable_set('file_croptool_path', "sites/default/files");what if there are multiple sites under sites directory.? I think you should use file directory path here.
may be:-
or similar.
Thanks
-Inder Singh
http://indersingh.com
Comment #18
inders commentedComment #19
vishals_clarion commentedHi
We've rectified all the issues according to above comment.
Please check and share your suggestions/feedback for this module.
Comment #20
mraichelson commentedGuessing last update was supposed to go from "needs work" to "needs review" to get people looking at it again.
Comment #21
vishals_clarion commentedHi
We've rectified all the issues according to above comment.
Please check and share your suggestions/feedback for this module.
Comment #22
prashant.cIt is a nice module.
But not clear with the action on when we click "Crop & Save" button.
Attaching screenshot for the same.
Comment #23
vishals_clarion commented@Prashant
After clicking on the "Crop & save" button the images would be cropped and saved into the respected hidden field and user will be redirected to either node or term edit page.
After cropping images, you will find cropped images saved in respected folder according to the path provided in the configuration setting page.
Comment #24
vishals_clarion commentedComment #25
nuezMy review:
Concept
First of all many thanks for your contribution. I’m not sure if this is the place to debate the concept and the purpose of your module.Truth is that I do have some doubts about its purpose and how it’s different from modules such as manualcrop. Maybe you could elaborate in the project description. I'm sorry to say, and this is just my humble opinion, but the reasons you mention in #14 don't really point out any advantage over modules like manual crop, with which you can also have multiple crops for one image.
You could argue that if you want to display the same image but with different crops, you should still only have only one image field. You can use image styles to create different versions of that image, and you can use hook_field_extra_fields, or Display Suite, to show the same image several times in the node display using different image styles. Cropping it seems to me is image style stuff. But maybe I’m missing something essential.
Issues
I think you should allow the module to be enabled , even though the img select plugin isn’t present. Throw a warning on the status page.
Enabling the module through the ui does work properly.
Warning: imagepng(/Applications/MAMP/htdocs/insha/sites/default/files/cropimages/drupal_0_200_200.png): failed to open stream: No such file or directory in croptool_generate_images() (line 419 of /Applications/MAMP/htdocs/insha/sites/all/modules/croptool/croptool.module).This is because, like it says, the folder is relative to the root of the drupal installation. By default this folder is not writable. It should point by default to the sites/default/files/[folder-name] folder.
field_p and field_c. What does it stand for. _p = path and _c for a json string of settings.
https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_...
see https://drupal.org/node/171213
Conclusion:
Having a quick glance at the code, I feel like you need a lot of code for what you're trying to achieve, and are not leveraging the power of Drupal. With all the DB queries, ajax callbacks and such, it's hard to assess the security of your module. I think it would be a good idea to look into the drupal examples modules and see how they do stuff like ajax and normal administration pages, see if you can shorten your code and make it more readable. But true enough, apart from the one bug of the image generation folder and enabling by drush, I haven't found any other bugs, so it is working!
Comment #26
gisleFirst, very good review by nuez - there are a lot of work to do here, just to follow up on that review.
In addition:
There is already exists a lot of modules for cropping images for Drupal, and this one, to be honest, does not seem to be very well executed. It looks bloated, and does not leverage on Drupal.
Module duplication and fragmentation is a huge problem on Drupal.org and we prefer collaboration over competition. Unless you can argue your module is unique and significantly better than existing modules, and that cannot be fitted into (for instance) Manual Crop, it may be best suited as a sandbox.
To see if there is a way to get your work resolved within the framework of one of the already existing cropping tools, please open an issue in the most relevant issue queue for one of these tools to discuss what you need. You should also get in contact with the maintainer(s) to offer your help to move the project forward. If you cannot reach the maintainer(s) please follow the abandoned project process.
If that fails for whatever reason please get back to us and set this back to "needs review".
Comment #27
PA robot commentedClosing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).
I'm a robot and this is an automated message from Project Applications Scraper.