Add the Ability to Exclude Vocabularies from the Taxonomy_Multi_Edit Screen
EvanDonovan - July 2, 2009 - 21:59
| Project: | Taxonomy Multi Editor |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
In order to make the /admin/content/node/taxonomy_multi_edit page manageable, I changed the taxonomy_multi_edit_overview form to only show terms from certain vocabularies.
I made my changes starting around line 69 of taxonomy_multi_edit.module:
<?php
// kill description fields
foreach (element_children($fakeform['taxonomy']) as $vid) {
if (is_numeric($vid)) {
// check to make sure term is from the proper vocabulary: 5 is Organization Affiliation, 8 is Causes/Topics
if(($vid != 5) && ($vid != 8)) {
unset($fakeform['taxonomy'][$vid]);
}
unset($fakeform['taxonomy'][$vid]['#description']);
}
elseif ($vid == "tags") {
foreach(element_children($fakeform['taxonomy'][$vid]) as $tag_vid) {
// check to make sure term is from the proper tags vocabulary: 3 is Other Tags, 12 is Speaker/Author
if(($tag_vid != 3) && ($tag_vid != 12)) {
unset($fakeform['taxonomy'][$vid][$tag_vid]);
}
unset($fakeform['taxonomy'][$vid][$tag_vid]['#description']);
}
}
?>Let me know if you'd like me to post a patch. Of course, hard-coded vid's won't work for other people, so I was thinking a solution that involved comparing the vid with an array stored in the database (using drupal_set_variable) might be best.
I also made a few other minor improvements to the module, which I could go into if there's any interest. It seems like there hasn't been much activity on it for a while.

#1
I've decided to use Views Tagger for the "Assign Terms" functionality moving forward. Perhaps that page could be removed from this module, since it never worked that well anyway, and users just recommended to use that module for that particular functionality. See my issue #561664: Remove the "Assign Terms" page & feel free to set this one to "won't fix" or "by design".
#2
I agree that page is a bit redundant (and very ugly), given better ways of doing it now (I use editview)
Was just legacy. I was tempted to deprecate it when I added the UI into node actions on the content screen, but left it there for choice.
We'll consider phasing it out next time this module needs work.
#3
Ok, cool. I didn't have anything to replace it with myself until the Views Tagger module was released.