// $Id$
CONTENTS OF THIS FILE
---------------------
* Introduction
* Installation
* Design Decisions
INTRODUCTION
------------
Current maintainer: Karen Ziv <me@karenziv.com>
Taxonomy dupecheck module prevents Drupal administrators from adding duplicate
taxonomy vocabularies and/or terms. It's helpful when entering large amounts
of terms or vocabularies in situations where each value must be unique. This
saves time by preventing administrators from having to enforce a unique value
policy through later cleanup of duplicate terms.
The module provides a configuration screen allowing administrators to choose
which should be unique: taxonomy terms, vocabularies or both. It defaults to
case-insensitive comparisons, with an option to change to case-sensitive. Both
stored and input terms/vocabularies are trimmed before comparison to handle
cases such as 'foo ' and 'foo'. Based on the settings, the user will see an
error message when adding a duplicate value.
INSTALLATION
------------
There are no special requirements for this module; installation uses the
standard Drupal process. If you're reading this, you've likely already
correctly installed this module.
1. Download the module from drupal.org.
2. Untar the archive into your modules directory.
3. Go to Admin > Site building > Modules and enable the Taxonomy dupecheck module.
4. Configure settings at Admin > Site configuration > Taxonomy dupecheck.
DESIGN DECISIONS
----------------
This module works by hooking into the taxonomy term and vocabulary admin
forms. Ideally, this would have happened instead in hook_taxonomy, but
this hook doesn't allow you to stop the save process, only run other tasks
based on the term/vocabulary info. This means that if you call
taxonomy_save_term or taxonomy_save_vocabulary programmatically, this
validation won't happen.
Note that the default comparison is case-insensitive. That is,
'foo' and 'Foo' will be considered duplicates. Case sensitivity can be
configured in the admin configuration (see INSTALLATION).
Also, all strings--stored and input--are trimmed before comparison. This is
not an option because no valid use case for values with preceding or trailing
spaces in term/vocabulary was found at the time of the design to add this
functionality. If this becomes problematic, please make a feature request
and it can be added as an option.
View source
- // $Id$
-
- CONTENTS OF THIS FILE
- ---------------------
-
- * Introduction
- * Installation
- * Design Decisions
-
- INTRODUCTION
- ------------
-
- Current maintainer: Karen Ziv
-
- Taxonomy dupecheck module prevents Drupal administrators from adding duplicate
- taxonomy vocabularies and/or terms. It's helpful when entering large amounts
- of terms or vocabularies in situations where each value must be unique. This
- saves time by preventing administrators from having to enforce a unique value
- policy through later cleanup of duplicate terms.
-
- The module provides a configuration screen allowing administrators to choose
- which should be unique: taxonomy terms, vocabularies or both. It defaults to
- case-insensitive comparisons, with an option to change to case-sensitive. Both
- stored and input terms/vocabularies are trimmed before comparison to handle
- cases such as 'foo ' and 'foo'. Based on the settings, the user will see an
- error message when adding a duplicate value.
-
- INSTALLATION
- ------------
-
- There are no special requirements for this module; installation uses the
- standard Drupal process. If you're reading this, you've likely already
- correctly installed this module.
-
- 1. Download the module from drupal.org.
- 2. Untar the archive into your modules directory.
- 3. Go to Admin > Site building > Modules and enable the Taxonomy dupecheck module.
- 4. Configure settings at Admin > Site configuration > Taxonomy dupecheck.
-
- DESIGN DECISIONS
- ----------------
-
- This module works by hooking into the taxonomy term and vocabulary admin
- forms. Ideally, this would have happened instead in hook_taxonomy, but
- this hook doesn't allow you to stop the save process, only run other tasks
- based on the term/vocabulary info. This means that if you call
- taxonomy_save_term or taxonomy_save_vocabulary programmatically, this
- validation won't happen.
-
- Note that the default comparison is case-insensitive. That is,
- 'foo' and 'Foo' will be considered duplicates. Case sensitivity can be
- configured in the admin configuration (see INSTALLATION).
-
- Also, all strings--stored and input--are trimmed before comparison. This is
- not an option because no valid use case for values with preceding or trailing
- spaces in term/vocabulary was found at the time of the design to add this
- functionality. If this becomes problematic, please make a feature request
- and it can be added as an option.