Tag Trap is a module that allows administrators to specify certain tags that are not allowed in a free-tagging taxonomy environment. To be clearer, if you've set up your site to have one or more free-tagging fields for content creation, you can apply this "trap" to the free-tagging field's vocab so that when the user submits the form (the node creation or edit form) for validation, the validation will fail if any of the terms the user supplied are in the exclusionary list for that vocab. It fails validation on the first term that it comes across that is not allowed.

Note that this ONLY applies to free-tagging and no other form of tagging.

This module is still being tested.

April 20, 2009 Update - I committed a new version of the module to 6.x-1.x-dev with support for regular expression matching. There were a couple of substantial changes to the schema so if you've got an old copy of this module, please download the latest version. As always, this is a development version so use at your own... choosing. Report issues or feature requests on the issue queue. Thanks!

Installation

  1. Follow the regular rules of module installation for Drupal. Create the folder "modules" at sites/all and then untar this module into the "modules" directory.
  2. Enable the module at "Administer", "Site Building", then "Modules".
  3. You can adjust the disallowed terms on a per vocabulary basis. Go to "Administer", "Content Management", "Taxonomy", and then click "edit vocabulary" for any vocab you want to disallow terms on. NOTE: a text field will appear at the end of the form ONLY for vocabs with the "Tags" (free-tagging) option checked. If the vocab is not free-tagging enabled, you must enabled free-tagging for it to appear.
  4. In the "Exclude terms" field, provide a comma-separated list of words to exclude. Example: zebra,giraffe,leopard,snake. White space between the words is irrelevant.
  5. Save the list you've created.
  6. You can try it out by editing or creating a node and adding terms to it that should NOT be allowed.
  7. If you disable free-tagging for any vocab, the list will be there when you re-enable free-tagging.

Project Information

  • Maintenance status: Unknown
  • Development status: Unknown
  • Module categories: Taxonomy
  • Reported installs: 4 sites currently report using this module. View usage statistics.
  • Downloads: 386
  • Last modified: June 30, 2009

Downloads