diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-02-20 22:44:51 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-02-20 22:44:51 +0000 |
commit | 277ceae5150ccf3082ca99e73a82da58814ebaf5 (patch) | |
tree | 6f2cbb14ff94893dcbb6603ce47785e41f62c869 /modules/taxonomy/taxonomy.module | |
parent | 53deeb188a5b3d8158b9fa4f05c1b99c773820f1 (diff) | |
download | brdo-277ceae5150ccf3082ca99e73a82da58814ebaf5.tar.gz brdo-277ceae5150ccf3082ca99e73a82da58814ebaf5.tar.bz2 |
- New menu houskeeping. Prototyped by Zbynek.
The following modules need updating:
* glossary module
* feed module (Breyten's version)
* mailhandler module
* notify module
* project module
* smileys module
* admin module
* style module
* taxonomy_dhtml module
To avoid unexpected problems menu_add() is deprecated (it will print an
error message when used) and menu() should be used instead.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index dd67863cb..9917281fa 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -31,9 +31,9 @@ function taxonomy_link($type, $node = NULL) { $help["taxonomy"] = "The taxonomy module allows you to classify post into categories and subcategories; it allows multiple lists of categories for classification (controlled vocabularies) and offers the possibility of creating thesauri (controlled vocabularies that indicate the relationship of terms) and taxonomies (controlled vocabularies where relationships are indicated hierarchically)."; $help["vocabulary"] = "When you create a controlled vocabulary you are creating a set of terms to use for describing content (known as descriptors in indexing lingo). Drupal allows you to describe each node of content (blog, story, etc.) using one or many of these terms. For simple implementations, you might create a set of categories without subcategories, similar to Slashdot.org's or Kuro5hin.org's sections. For more complex implementations, you might create a hierarchical list of categories."; - menu_add("taxonomy", url("admin/taxonomy"), "Administer taxonomies.", $help["taxonomy"], "content management", 1); - menu_add("add new vocabulary", url("admin/taxonomy/add/vocabulary"), "Add a new vocabulary.", $help["vocabulary"], "taxonomy"); - menu_add("help", url("admin/taxonomy/help"), "More information about taxonomies.", NULL, "taxonomy", 9); + menu("admin/taxonomy", "taxonomy", "taxonomy_admin", $help["taxonomy"], 3); + menu("admin/taxonomy/create vocabulary", "create new vocabulary", "taxonomy_admin", $help["vocabulary"]); + menu("admin/taxonomy/help", "help", "taxonomy_admin", NULL, 9); } else if ($type == "taxonomy terms" && $node != NULL) { /* @@ -274,7 +274,7 @@ function taxonomy_overview() { foreach ($vocabularies as $vocabulary) { $links = array(); - $rows[] = array($vocabulary->name, array("data" => $vocabulary->types, "align" => "center"), l(t("edit vocabulary"), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t("add term"), "admin/taxonomy/add/term/$vocabulary->vid"), l(t("preview form"), "admin/taxonomy/preview/vocabulary/$vocabulary->vid")); + $rows[] = array($vocabulary->name, array("data" => $vocabulary->types, "align" => "center"), l(t("edit vocabulary"), "admin/taxonomy/edit/vocabulary/$vocabulary->vid"), l(t("add term"), "admin/taxonomy/add term/$vocabulary->vid"), l(t("preview form"), "admin/taxonomy/preview/vocabulary/$vocabulary->vid")); $tree = taxonomy_get_tree($vocabulary->vid); if ($tree) { @@ -716,13 +716,11 @@ function taxonomy_admin() { } switch ($op) { - case "add": - if (arg(3) == "vocabulary") { - print taxonomy_form_vocabulary(); - } - else { - print taxonomy_form_term(); - } + case "create vocabulary": + print taxonomy_form_vocabulary(); + break; + case "add term": + print taxonomy_form_term(); break; case "edit": if (arg(3) == "vocabulary") { |