From 3ad7449bc7a31917aaaf38da7e09d1131c05ddc1 Mon Sep 17 00:00:00 2001
From: Dries Buytaert Classifying nodes allows for the organization of content into categories and subcategories of description. These categories can be used to organize and retrieve similarly described content. Drupal's taxonomy.module is an extremely flexible classification system that allows for 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). For details about classification types and insight into the development of taxonomy.module, see this drupal.org discussion.
";
+ $data .= _taxonomy_depth($term->depth) ." ". $term->name ." (". l(t("edit term"), "admin/taxonomy/edit/term/$term->tid") .")
";
}
$rows[] = array(array("data" => $data, "colspan" => 5));
}
@@ -710,31 +710,31 @@ function taxonomy_admin() {
}
switch ($op) {
- case "addvocabulary":
- print taxonomy_form_vocabulary();
+ case "add":
+ if (arg(3) == "vocabulary")
+ $output .= taxonomy_form_vocabulary();
+ else if (arg(3) == "term")
+ $output .= taxonomy_form_term();
break;
- case "addterm":
- print taxonomy_form_term();
- break;
- case "editvocabulary":
- print taxonomy_form_vocabulary(object2array(taxonomy_get_vocabulary(arg(3))));
- break;
- case "editterm":
- print taxonomy_form_term(object2array(taxonomy_get_term(arg(3))));
+ case "edit":
+ if (arg(3) == "vocabulary")
+ $output .= taxonomy_form_vocabulary(object2array(taxonomy_get_vocabulary(arg(4))));
+ else if (arg(3) == "term")
+ $output .= taxonomy_form_term(object2array(taxonomy_get_term(arg(4))));
break;
case "preview":
- print taxonomy_form(arg(4));
+ $output .= taxonomy_form(arg(4));
break;
case "help":
- print taxonomy_help();
+ $output .= taxonomy_help();
break;
case t("Delete"):
if (!$edit["confirm"]) {
if (arg(3) == "vocabulary") {
- echo _taxonomy_confirm_del_vocabulary($edit["vid"]);
+ $output .= _taxonomy_confirm_del_vocabulary($edit["vid"]);
}
else {
- echo _taxonomy_confirm_del_term($edit["tid"]);
+ $output .= _taxonomy_confirm_del_term($edit["tid"]);
}
break;
}
@@ -743,31 +743,31 @@ function taxonomy_admin() {
// fall through:
}
case t("Submit"):
- if (arg(2) == "addvocabulary" || arg(2) == "editvocabulary") {
- print status(taxonomy_save_vocabulary($edit));
+ if (arg(3) == "vocabulary") {
+ $output .= status(taxonomy_save_vocabulary($edit));
}
else {
- print status(taxonomy_save_term($edit));
+ return status(taxonomy_save_term($edit));
if (!$edit["tid"]) {
// if INSERT show form again
- print taxonomy_form_term();
+ $output .= taxonomy_form_term();
break;
}
// else (UPDATE or DELETE) fall through
}
// fall through:
default:
- print taxonomy_overview();
+ $output .= taxonomy_overview();
}
}
else {
- print message_access();
+ $output .= message_access();
}
+ return $output;
}
function taxonomy_help() {
- ?>
-
+?>
Background
Required. Select the term under which this term is a subset -- the branch of the hierarchy that this term belongs under. This is also known as the "Broader term" indicator used in thesauri.
Synonyms
Optional. Enter synonyms for this term, one synonym per line. Synonyms can be used for variant spellings, acronyms, and other terms that have the same meaning as the added term, but which are not explicitly listed in this thesaurus (i.e. unauthorized terms).
In order to view the nodes associated with a term or a collection of terms, you should browse to a properly formed URL. For example, see ">. Taxonomy URLs always contain a term ID or list of term IDs at the end of the URL (aka querystring). You may learn the term ID for a given term by hovering over that term in the page in the Admin and noting the number after the querystring parameter called tid. If you wish to see nodes from a collection of term IDs, separate each term ID with a comma. Also, the name of the querystring parameter may be or or and: or shows nodes which appear in any of the term IDs while and shows nodes in all the specified term IDs. Thus, or is less specific than and.
@@ -826,4 +825,4 @@ function taxonomy_help() {Every term, or collection of terms, provides an RSS feed to which interested users may subscribe. The URL format for an sample RSS feed is ">.
+?> \ No newline at end of file -- cgit v1.2.3