This is a light weight module. This is developed in consideration with adding vocabulary images. In some cases your project( E-commerce site) needs to display list of vocabularies with their images.
One of my project needs to same feature. I searched a lot but not found any solution. Then after all I decided to write their own module and also wants it to contribute. So it can provide some help to reach at appropriate solution for this type of listing.
Full project Link - http://drupal.org/sandbox/brajendrasingh/1386558
Git repository - git clone http://git.drupal.org/sandbox/brajendrasingh/1386558.git vocabulary_image
Version - Drupal7
Reviews of Other Projects :
http://drupal.org/node/1822638#comment-6646678
http://drupal.org/node/1813774#comment-6616994
http://drupal.org/node/1813730#comment-6616958
http://drupal.org/node/1793146#comment-6513500
http://drupal.org/node/1823698#comment-6652022
| Comment | File | Size | Author |
|---|---|---|---|
| #31 | admin_structure_taxonomy_tags_edit.png | 28.22 KB | veeraprasadd |
| #2 | pareview.txt | 36.35 KB | anwar_max |
Comments
Comment #1
JupiterIII commentedYou only need one project reviewed to be granted full project access (and it cuts down on the Project Applications queue). So please pick one you'd like reviewed, then close the other(s).
Comment #2
anwar_maxIt 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.
Manual Review:
1) vocab_image_settings_form() please make sure that each user facing string should run through t(). Example: '#description' => 'Separate extensions with a space or comma and do not include the leading dot.', should be like '#description' => t('Separate extensions with a space or comma and do not include the leading dot.').
2) Remove extra comments from vocab_image_settings_form(). Example: //'#title' => t('Maximum image resolution').
3) vocab_image_settings_page_validate() funtion should use t(). Example: form_set_error('vocab_max_image_resolution_width', t('Enter valid width for "Maximum image resolution".')). Please do this for all the form_set_error() functions.
Comment #3
brajendrasingh commentedHi Jupiter,
I closed my another two projects. I am recently working on this project(vocabulary_image).
But i am unable to connect my git repository. I can not do any update on same.
Can you please help me to resolve this problem.
Thanks in advance !
Comment #4
brajendrasingh commentedThis is a light weight module. This is developed in consideration with adding vocabulary images. In some cases your project( E-commerce site) needs to display list of vocabularies with their images.
One of my project needs to same feature. I searched a lot but not found any solution. Then after all I decided to write their own module and also wants it to contribute. So it can provide some help to reach at appropriate solution for this type of listing.
Full project Link - http://drupal.org/sandbox/brajendrasingh/1386558
Git repository - git clone http://git.drupal.org/sandbox/brajendrasingh/1386558.git vocabulary_image
Version - 7.x-1.x
Review of the 7.x-1.x branch - http://ventral.org/pareview/httpgitdrupalorgsandboxbrajendrasingh1386558git
Comment #5
DmitriyMakeev commentedAnd db_drop_field to uninstall. See Schema API functions.
vocabulary_image.admin.inc 24 - '#description' without t().
db_query("SELECT fid FROM {taxonomy_vocabulary_image} WHERE vid = " . $vid . "")->fetchField();. UseComment #6
brajendrasingh commentedHi Dmitriy,
Thanks for your suggestion as point 1. Actually I do not wants to make any change in core tables by so I have created new table for this specific module.
According to your comment I have fixed point 2 & 3.
Thanks...
Comment #7
brajendrasingh commentedDear Team,
I have closed all open issues. Please make it full project release.
Thanks
Comment #8
brajendrasingh commentedI have fixed all issues.
Below are list of my project reviews at drupal.org -
http://drupal.org/node/1822638#comment-6646678
http://drupal.org/node/1813774#comment-6616994
http://drupal.org/node/1813730#comment-6616958
http://drupal.org/node/1793146#comment-6513500
http://drupal.org/node/1823698#comment-6652022
Please allow me for full project release. This is my first project.
It will be a great achievement for me.
If I will get this achievement then I will do my best for another contribution.
Thanks..
Comment #9
brajendrasingh commentedI have fixed all issues.
Below are list of my project reviews at drupal.org -
http://drupal.org/node/1822638#comment-6646678
http://drupal.org/node/1813774#comment-6616994
http://drupal.org/node/1813730#comment-6616958
http://drupal.org/node/1793146#comment-6513500
http://drupal.org/node/1823698#comment-6652022
Comment #10
anton-staroverov commentedHi brajendrasingh,
thank you for your module.
1) Manual code review. vocabulary_image.info: "Other" is bad package name, may be it's better to rename package to "Taxonomy" or something similar?
2) Manual code review. vocabulary_image.admin.inc: lines 127-144 may be it's better to loop through a cycle on array('vocab_image_extension', 'vocab_max_image_resolution_width', ...) and execute variable_set() instruction inside it?
3) Manual code review. vocabulary_image.module: I don't see any theme functions and template references. How vocabulary image will be appeared on the pages by default?
Comment #11
brajendrasingh commentedHi Tony,
Thanks for your suggestion.
I have fixed point 1 and 2 as per your suggestion.
In regarding to point 3 there is no any theme function to display vocabulary image.
This module provides only vocabulary image path by which you can display images according to your desired image cache.
Thanks..
Comment #12
anton-staroverov commentedThank you for hot fixes. But it still needs review.
Comment #13
r2integrated commentedOverall:
Very simple, to the point. Solves a very specific need, but does so adequately.
Automated Review:
No Issues, excellent =D
Manual Review:
Comment #14
brajendrasingh commentedHi Patrik,
I have fixed your reporetd issues as where needed.
Kindly review same.
Thanks...
Comment #15
r2integrated commentedManual Review:
Notice: Undefined index: vocab_image in vocabulary_image_custom_image_submit() (line 104 of /www/vhosts/sandbox.localhost/sites/all/modules/testing/vocabulary_image/vocabulary_image.module).See line 104:
Should be:
You can optionally check its value if it is set, as isset() will not test for whether the value is an empty string. This function can be simplified further, eliminating the two if conditionals checking the presense of the same variable:
Comment #16
r2integrated commentedComment #17
brajendrasingh commentedHi Patrik,
I have fixed all issues as per your guideline.
Kindly review the same.
Thanks...
Comment #18
anwar_maxManual Review:
1) Remove unnecessary comments from the vocabulary_image.admin.inc file.
example: // '#upload_validators' => vocabulary_image_custom_validate_image(),
on line no 84.
2) Use placeholders instead of concating variables in query(http://drupal.org/writing-secure-code).
example: $vocab_id = db_query("SELECT vid FROM {taxonomy_vocabulary} WHERE machine_name = '" . $form_state['values']['machine_name'] . "'")->fetchField();
Comment #19
anwar_maxForgot to change the status.
Comment #20
brajendrasingh commentedHI Anwar,
I have removed unnecessary comments & add placeholders instead of concating variables.
Thanks...
Comment #21
anwar_maxManual Review:
1. vocabulary_image_form_alter(): This function is vulnerable to XSS. You need to sanitize strings or urls before printing.
example: $image->uri should be like check_url($image->uri).
2. vocabulary_image_custom_validate_image(): This function is also vulnerable to XSS. Please use proper santization function to santize the strings. see http://api.drupal.org/api/drupal/includes!common.inc/group/sanitization/7
There are two articles which are related to writing secure code and you must read these articles
i) http://drupal.org/node/28984
ii) http://api.drupal.org/api/drupal/includes!common.inc/group/sanitization/7
Comment #22
brajendrasingh commentedHi Anwar,
Issues are fixed now.
Thanks...
Comment #23
brajendrasingh commentedAdd Other projects review tag.
Comment #24
klausiPlease don't remove the security tag, we keep that for statistics and to show examples of security problems.
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. You have to get a review bonus to get a review from me.
manual review:
Otherwise I think this is nearly ready. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #25
brajendrasingh commentedHi Klausi,
Issues reported by you are now fixed.
Thanks...
Comment #26
_wdm_ commentedAutomatic Review:
All good.
Manual Review:
You have a spelling mistake "addtional" in your comment, vocabulary_image:line 26
And again "incase", vocabulary_image:line 29
Instead of your "hook_form_alter" implementation have you consider using: hook_form_FORM_ID_alter
General comment:
I do not see the value in this module, it can be implemented by a site builder: adding an Image field to the taxonomy.
Adding the field to the taxonomy via the existing functionality provides more features and keep the image upload inline with other image fields for UI, implementation and most importantly security updates.
Comment #27
brajendrasingh commentedHi William,
I have fixed all your reported issues.
This module is not for adding image with taxonomy terms. This is for adding image with vocabularies. No any site builder is available to add additional field with vocabulary creation form.
Thanks.
Comment #28
brajendrasingh commentedForgot to change the status.
Comment #29
jbloomfield commentedAutomatic Review
Sorry, found some ventral.org issues at http://ventral.org/pareview/httpgitdrupalorgsandboxbrajendrasingh1386558git
Manual Review
Is there a reason why you named the validate and submit functions for the admin settings form as
vocabulary_image_settings_page_validate()andvocabulary_image_settings_page_submit()? If you were to name them the same as your settings form e.gvocabulary_image_settings_validate()andvocabulary_image_settings_submit()then you would not need to add$form['#validate'][] = 'vocabulary_image_settings_page_validate';and$form['#submit'][] = 'vocabulary_image_settings_page_submit';to the form. They will get called automatically.Apart from these observations, I can't find anything other issues. Nice work!
Comment #30
brajendrasingh commentedHi John,
Your reported issue is now fixed.
Thanks for your time for review.
Thanks
Comment #31
veeraprasadd commentedHi brajendrasingh,
No issues while doing automated review in ventral.org
-------
Found some major issues while doing manual review.
------
------
-------
And other minor issues found in manual review.
-----------
File : vocabulary_image.admin.inc
Give the single line after every $form in function vocabulary_image_settings_form or just follow the same indentation for all forms.
Line 101: Expected single line.
Line 106: Use t() for error description.
Line 109: Use t() for error description.
Line 112: Use t() for error description.
Line 116: Use t() for error description.
Line 119: Use t() for error description.
Line 122: Expected single line.
--------
File: vocabulary_image.install
Line 34: Expected single line.
--------
File: vocabulary_image.module
Line 22: Expected single line.
Line 56: Expected single line.
Line 98: Expected single line.
Line 135: Expected single line.
Line 154: Expected single line.
------
Final conclusion: I hope you need to spend some more time to fix these issues.
Thanks and Regards,
D. Veera Prasad.
www.drup-all.com
Comment #32
likebtn commentedConsider the following:
- adding admin screenshots to the project page: http://drupal.org/sandbox/brajendrasingh/1386558
- justifying tabs and indents in vocabulary_image.module for arrays (for example, for the array on line 11)
Comment #33
brajendrasingh commentedIssue have been fixed now.
Thanks,
Comment #34
tmctighe commentedBrajendra,
No issues were found from PAReview.
Manual Review:
1. Your Project Page could use some work. You've got some of the good basics (features, an example case & overview) however some additional sections like Requirements, Similar Projects, and Documentation links would go a long way. A great read on this is at: http://drupal.org/node/997024
2. A Documentation Page would help a lot. This helps new users know how to use the module and can include any other useful information you might have for someone trying Vocabulary image. See #5 on this link: http://drupal.org/node/7765
3. There is one security concern: your files have group write permissions. If you develop on linux you can fix this by using the command: "chmod 644 /path/to/file" on all files.
4. Coding standards:
vocabulary_image.admin.inc - line 24 - the description should be wrapped with t();
vocabulary_image.module - line 83 - I don't see a use for this line. The documentation for file_validate_size does not accept the user id as an argument, and also calls it's own instance of global $user.
5. Module functionality:
As far as I can tell the size and resolution restrictions do not work. I tried setting the minimum and maximum both to 10x10 and uploaded a much larger image successfully. The file extension restriction did appear to work properly.
Otherwise the module seemed to work properly.
Comment #35
klausiSorry for the delay. Make sure to review more project applications and get a new review bonus and this will get finished faster.
manual review:
But otherwise I think this is RTBC.
Assigning to mitchell as he might have time to take a final look at this.
Comment #36
klausino objections for more than a week, so ...
Thanks for your contribution, brajendrasingh!
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 #37.0
(not verified) commentedAdd other projects reviews.
Comment #38
avpadernoComment #39
avpaderno