Description (copied from project page)
"Taxonomy term color is a module which allows you to add colors to terms.
WHY DO I NEED THIS?
Some websites want to seperate their content into different categories and
want to have a color for each category. This is possible with taxonomy term color
INSTALLATION AND CONFIGURATION:
- Put this module in sites/*/modules
- Enable it under admin/build/modules
- Tick the checkbox "Assign term colors" for the vocabularies whose terms should get a color.
- Now you can enter the color on the term edit page
Little feature: If you have the colorpicker module installed you can choose a color easily with a colorpicker.
HOW CAN I GET THE COLOR OF A TERM?
This module provides a function which returns the color of a term:
_taxonomy_term_color_term_color($term_id)"
Project Page
http://drupal.org/sandbox/yan_nick/1330800
Repository
git clone --branch master http://git.drupal.org/sandbox/yan_nick/1330800.git
Versions
Drupal 6.x
Comments
Comment #1
doitDave commentedI just tested your module with D6/Windows/PHP5/My5. I activated the module, checked "assign colors" on a vocabulary page.
But, there is no additional option in the terms anywhere!Sorry, I did not look close enough at the first time. But now that I found the input field and added the value
#f00for an existing term, a database warning occured:Also, the color is not even being saved. Even when leaving the color field empty, saving throws this error. When setting a color whilst adding a new term, there is no such error.
Seems like you always save data into term_color, even when there is nothing to save. So either you would need to check for existing keys on saving (update syntax) or you should only insert when a value is given.
Comment #2
yannickooSo I fixed that, can you review it?
Comment #3
doitDave commentedHi yan_nick,
first a quick review:
Then a question I should have already asked in my last comment: What exactly is the benefit from defining a color? On first sight I did not find any theming or output function applying the color (and testing it now was not possible, see above). You should probably also clarify this in the module description as well as in the README file.
Comment #4
yannickooThanks for your review doitDave,
I think you forgot to tick the box "Assign term colors" on the vocabulary settings page :)
I created a new branch so the new repository is:
git clone --branch 6.x-1.0 http://git.drupal.org/sandbox/yan_nick/1330800.git
Comment #4.0
yannickooAdding h3 tags
Comment #4.1
yannickooUpdated the description
Comment #5
doitDave commentedHi yan_nick,
functionality now seems as expected. But you should take one more close look at the commenting standards as linked above:
Take some time to read into the coding standards and do this properly as anybody hooking into your module at a later time or supporting you with patches oder maintenance will highly appreciate well documented code. Also, it is recommended to empty the master branch (see above).
Comment #6
yannickooOkay, I added more comments.
Comment #7
klausiPlease only submit one project application, we will review #1341360: [D6] Gallery link. Marking this one as duplicate.
Comment #8
yannickooI can set the status to "needs review" when gallery link is reviewed or?
Comment #9
klausiNot necessary, we approve you only once. You will be able to promote all your projects to full projects yourself.
Comment #9.0
klausiUpdated the description
Comment #10
avpaderno