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 - 7.x-1.x
Review of the 7.x-1.x branch - http://ventral.org/pareview/httpgitdrupalorgsandboxbrajendrasingh1386558git
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Screenshot.png | 59.37 KB | d2ev |
Comments
Comment #1
drinkynet commentedAutomatic Review:
The coder module set to minor warning level found 3 things:
fid = db_query("select fid from {taxonomy_vocabulary_image} where vid = " . $vid . "")->fetchField();$vocab_id = db_query("select vid from {taxonomy_vocabulary} where machine_name = '" . $form_state['values']['machine_name'] . "'")->fetchField();$fid = db_query("select fid from {taxonomy_vocabulary_image} where vid = " . $vid . "")->fetchField()Manual Review
1. When i first filled in the settings form and saved it I got a PHP coding standards warning
Notice: Undefined index: vocab_default_image in vocabulary_image_settings_page_submit() (line 105 of \sites\all\modules\vocabulary_image\vocabulary_image.admin.inc).on line 104 of vocabulary_image.admin.inc you have an implicit test, you'll need to wrap it in either
isset()or!empty()depending on what you are testing for.It looks like you're testing for a field that you have since removed from the form or placed elsewhere. So it's a case of binning the test here or putting the field back into the form.
2. On the configuration form the help text for the Allowed file extensions field reads "Separate extensions with a space or comma and do not include the leading dot." it would be helpful if you could parse the contents when the admin form is submitted and validate it. I added the leading dots (like it says not to) and it saved, throwing this error on the taxonomy form when I tried to upload an image: The selected file \fakepath\IMG_2179.jpg cannot be uploaded. Only files with the following extensions are allowed: .png, , .jpg..
3. Your project page could use a bit more content describing the purpose and features.
4. There is potentially a similar module http://drupal.org/project/taxonomy_image which looks like it assigns images at the term level. Is the difference that yours assigns images at the vocabulary level and this does not? It looks like they are looking for a maintainer, your feature could potentially be an enhancement to this module.
5. Your .install file doesn't have an uninstall hook, you should probably implement one to clean up your variables, database modifications, images and stored data generated by your module when a user un-installs your module.
Comment #2
drinkynet commentedComment #3
brajendrasingh commentedHi James,
Thanks for review this module.
I have fixed all issues which you have mentioned after automatic and manual review.
Kindly review again and let me know if any another issue found.
Thanks...
Comment #4
d2ev commentedInstalled this module and found error while uploading image for vocabulary ( see the attached screenshot ).
It would be nice if you could integrate it with views module and don't forget to show successful messages for end user on successful form submit( missing in vocabulary_image_settings_page_submit form).
Comment #5
brajendrasingh commentedHi Asiq,
I have fixed your pointed issue.
In regarding to views integration, I am planning about this.
Thanks...
Comment #6
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.