From 058971c33b8dca63fd33b188328fc3e3ec9fb372 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 3 Oct 2003 14:55:27 +0000 Subject: - Help improvements and translation improvements from Michael. Thanks! --- modules/taxonomy/taxonomy.module | 45 +++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 12 deletions(-) (limited to 'modules/taxonomy/taxonomy.module') diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 2627dc9dd..0d90266ef 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -2,8 +2,11 @@ // $Id$ function taxonomy_system($field){ - $system["description"] = taxonomy_help("admin/system/modules"); - return $system[$field]; + $output = ""; + + if ($field == "description") {$output = taxonomy_help("admin/system/modules"); }; + + return $output; } function taxonomy_feed($taxonomy) { @@ -801,30 +804,48 @@ function taxonomy_admin() { } function taxonomy_help($section = "admin/taxonomy/help") { + $output = ""; switch ($section) { case "admin/system/modules": - $output = "Enables the organization of content into categories."; + $output = t("Enables the organization of content into categories."); break; case "admin/taxonomy": - $output = "The taxonomy module allows you to classify content 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). To delete a term choose \"edit term\". To delete a vocabulary, and all its terms, choose \"edit vocabulary\"."; + $output = t("The taxonomy module allows you to classify content 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). To delete a term choose \"edit term\". To delete a vocabulary, and all its terms, choose \"edit vocabulary\"."); break; case "admin/taxonomy/add/vocabulary": - $output ="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 type (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."; + $output = t("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 type (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."); break; case "admin/taxonomy/help": - $output .= "

Background

Taxonomy is the study of classification. Drupal's taxonomy module allows you to define categories which are used to classify content. The module supports hierarchical classification and association between terms, allowing for truly flexible information retrieval and classification. For more details about classification types and insight into the development of the taxonomy.module, see this drupal.org discussion.

"; + $output .= "

Background

Taxonomy is the study of classification. Drupal's taxonomy module allows you to define categories which are used to classify content. The module supports hierarchical classification and association between terms, allowing for truly flexible information retrieval and classification. For more details about %classification-types and insight into the development of the taxonomy.module, see this %drupal-dis.

"; $output .= "

An example taxonomy: food

"; $output .= "

Notes

"; - $output .= "

Vocabularies

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's sections. For more complex implementations, you might create a hierarchical list of categories such as Food taxonomy shown above.

"; + $output .= "

Vocabularies

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's sections. For more complex implementations, you might create a hierarchical list of categories such as Food taxonomy shown above.

"; $output .= "

Setting up a vocabulary

When setting up a controlled vocabulary, if you select the hierarchy option, you will be defining a taxonomy or a thesaurus. If you select the related terms option, you are allowing the definition of related terms, think see also, as in a thesaurus. Selecting multiple select will allow you to describe a node using more than one term. That node will then appear in each term's page, thus increasing the chance that a user will find it.

"; - $output .= "

When setting up a controlled vocabulary you are asked for:

"; + $output .= "

When setting up a controlled vocabulary you are asked for:

"; $output .= "

Adding terms to a vocabulary

Once done defining the vocabulary, you have to add terms to it to make it useful. The options you see when adding a term to a vocabulary will depend on what you selected for related terms, hierarchy and multiple select. These options are:

"; - $output .= "

"; - $output .= "

Displaying nodes organized by term(s)

In order to view the nodes associated with a term or a collection of terms, you should browse to a properly formed Taxonomy URL. For example, ". l("taxonomy/page/or/1,2","taxonomy/pages/or/1,2") .". Taxonomy URLs always contain one or more term IDs (tid) at the end of the URL (a.k.a the querystring). You may learn the term ID for a given term by hovering over that term in the ". l("taxonomy overview", "admin/taxonomy") ." page and noting the number at the end or the URL. To build a Taxonomy URL start with \"taxonomy/page\". Now add the querystring parameter, either or, which chooses nodes tagged with any of the given term IDs, or and, which chooses nodes tagged with all of the given Term IDs. Thus or is less specific than and. Finally add a comma seperated list of term IDs.

"; - $output .= "

RSS feeds

Every term, or collection of terms, provides an RSS feed to which interested users may subscribe. The URL format for a sample RSS feed is ". l("node/feed/or/1,2","node/feed/or/1,2") .". Built like a Taxonomy URL, ". l("see above", "admin/taxonomy/help#taxonomyURL") ." it starts with \"node/feed\", then has the querystring parameter, and finally the Term IDs.

"; + $output .= "

"; + $output .= "

Displaying nodes organized by term(s)

In order to view the nodes associated with a term or a collection of terms, you should browse to a properly formed Taxonomy URL. For example, %taxo-example. Taxonomy URLs always contain one or more term IDs (tid) at the end of the URL (a.k.a the querystring). You may learn the term ID for a given term by hovering over that term in the %taxo-overview page and noting the number at the end or the URL. To build a Taxonomy URL start with \"taxonomy/page\". Now add the querystring parameter, either or, which chooses nodes tagged with any of the given term IDs, or and, which chooses nodes tagged with all of the given Term IDs. Thus or is less specific than and. Finally add a comma seperated list of term IDs.

"; + $output .= "

RSS feeds

Every term, or collection of terms, provides an %userland-rss feed to which interested users may subscribe. The URL format for a sample RSS feed is %sample-rss. Built like a Taxonomy URL, %taxo-help it starts with \"node/feed\", then has the querystring parameter, and finally the Term IDs.

"; + $output = t($output, array("%classification-types" => "classification types", "%drupal-dis" => "drupal.org discussion", "%slashdot" => "Slashdot", "%taxo-example" => l("taxonomy/page/or/1,2", "taxonomy/page/or/1,2"), "taxo-overview" => l(t("taxonomy overview"), "admin/taxonomy"), "%userland-rss" => "RSS", "sample-rss" => l("node/feed/or/1,2", "node/feed/or/1,2"), "taxo-help" => l(t("see above"), "admin/taxonomy/help#yaxonomyURL") )); break; } - return t($output); + + return $output; } ?> -- cgit v1.2.3