Thats too bad, this is a really useful module for adding data to taxonomy terms and vocubularies. There is a patch brewing, but its just not ready yet. I had a client that was using taxonomy to define seasons for products (for example "Fall 08", "Holiday 09", etc). The taxonomy part was working great, but how do you know when a season starts or ends? These aren't necessarily your standard spring/summer/fall/winter, they can be fairly arbitrary. It would be nice to be able to store that information about a term without having to write a whole custom module, but unfortunately no Taxonomy Enhancer.
So how hard is it to replicate the functinality from that module? Not too much trouble, just 2 hooks in fact.
hook_form_alter() checking for a $form_id of 'taxonomy_form_term' will let us add the fields to the page. In our case we only wanted this for terms in one vocabulary, so we also checked the vid and that the user had permission to edit the product seasons.
the second part is using hook_taxonomy() to save the date. This hook gets called anytime a term or vcabulary is inserted, updated, or deleted. So we check to make sure that
- its a term being modified (not a vocabulary) ($type == 'term')
- its in the the vocabulary we're interested in ($array['vid'] == SEASON_VID)
- the user has permission to edit this kind of data (user_access('administer seasons'))
If all of the above are true we store the data, and we're free to call it back later and make sure we're only showing the user the product seasons s/he is supposed to see!




Latest Comments