From 2e22798a8d2fdda43c43936aef8e37c62314aee4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 25 Aug 2003 16:57:55 +0000 Subject: - More help system updates by Michael F. --- modules/queue.module | 23 ++++++++++++++++++++--- modules/search.module | 32 ++++++++++++++++++++++++-------- modules/search/search.module | 32 ++++++++++++++++++++++++-------- 3 files changed, 68 insertions(+), 19 deletions(-) diff --git a/modules/queue.module b/modules/queue.module index e79db77f2..4324cd61f 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -2,9 +2,26 @@ // $Id$ function queue_system($field){ - $system["description"] = t("Enables content to be moderated by the community."); - $system["admin_help"] = t("The queue provides a way for your users to vote on submitted content. This is called moderation. Users can moderate a post up (give it a point), or down (subtract a point). The settings below give you control over how many points are required for the status of a post to be automatically changed. See individual items for details."); - return $system[$field]; + $output = ""; + + if ($field == "description") {$output = queue_help("admin/system/modules"); } + else if ($field == "admin_help") {$output = queue_help("admin/system/modules/queue"); }; + + return $output; +} + +function queue_help($section) { + $output = ""; + + switch ($section) { + case 'admin/system/modules': + $output = "Enables content to be moderated by the community."; + break; + case 'admin/system/modules/queue': + $output = "The queue provides a way for your users to vote on submitted content. This is called moderation. Users can moderate a post up (give it a point), or down (subtract a point). The settings below give you control over how many points are required for the status of a post to be automatically changed. See individual items for details."; + break; + } + return t($output); } function queue_settings() { diff --git a/modules/search.module b/modules/search.module index 8bab38a11..462e32f1c 100644 --- a/modules/search.module +++ b/modules/search.module @@ -1,18 +1,34 @@ ". t("Search guidelines") .""; - $output .= "

". t("The search page allows you to search the web site's content. You can specify multiple words, and they will all be searched for. You can also use wildcards, so 'walk*' will match 'walk', 'walking', 'walker', 'walkable' and so on. Furthermore, searches are not case sensitive so searching for 'walk', 'Walk' or 'WALK' will yield exactly the same results.") ."

"; - $output .= "". t("Words excluded from the search") .""; - $output .= "

". t("Words that frequently occur, typically called 'noise words', are ignored. Example words are 'a', 'at', 'and', 'are', 'as', 'how', 'where', etc. Words shorter than %number letters are also ignored.", array("%number" => variable_get("minimum_word_size", 2))) ."

"; +function search_help($section = "admin/search/help") { + $output = ""; + + switch ($section) { + case 'admin/help': + case 'admin/search/help': + $output = "Search guidelines"; + $output .= "

The search page allows you to search the web site's content. You can specify multiple words, and they will all be searched for. You can also use wildcards, so 'walk*' will match 'walk', 'walking', 'walker', 'walkable' and so on. Furthermore, searches are not case sensitive so searching for 'walk', 'Walk' or 'WALK' will yield exactly the same results.

"; + $output .= "Words excluded from the search"; + $output .= strtr("

Words that frequently occur, typically called 'noise words', are ignored. Example words are 'a', 'at', 'and', 'are', 'as', 'how', 'where', etc. Words shorter than %number letters are also ignored.

", array("%number" => variable_get("minimum_word_size", 2))); + break; + case 'admin/system/modules': + $output = "Enables site wide keyword searching."; + break; + case 'admin/system/modules/search': + $output = "The search engine works by keeping an index of \"interesting\" words. To make sure we only get \"interesting\" words you need to set the following."; + break; + } return $output; } function search_system($field){ - $system["description"] = t("Enables site wide keyword searching."); - $system["admin_help"] = t("The search engine works by keeping an index of \"interesting\" words. To make sure we only get \"interesting\" words you need to set the following."); - return $system[$field]; + $output = ""; + + if ($field == "description") {$output = search_help("admin/system/modules"); } + else if ($field == "admin_help") {$output = search_help("admin/system/modules/queue"); }; + + return $output; } /** diff --git a/modules/search/search.module b/modules/search/search.module index 8bab38a11..462e32f1c 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -1,18 +1,34 @@ ". t("Search guidelines") .""; - $output .= "

". t("The search page allows you to search the web site's content. You can specify multiple words, and they will all be searched for. You can also use wildcards, so 'walk*' will match 'walk', 'walking', 'walker', 'walkable' and so on. Furthermore, searches are not case sensitive so searching for 'walk', 'Walk' or 'WALK' will yield exactly the same results.") ."

"; - $output .= "". t("Words excluded from the search") .""; - $output .= "

". t("Words that frequently occur, typically called 'noise words', are ignored. Example words are 'a', 'at', 'and', 'are', 'as', 'how', 'where', etc. Words shorter than %number letters are also ignored.", array("%number" => variable_get("minimum_word_size", 2))) ."

"; +function search_help($section = "admin/search/help") { + $output = ""; + + switch ($section) { + case 'admin/help': + case 'admin/search/help': + $output = "Search guidelines"; + $output .= "

The search page allows you to search the web site's content. You can specify multiple words, and they will all be searched for. You can also use wildcards, so 'walk*' will match 'walk', 'walking', 'walker', 'walkable' and so on. Furthermore, searches are not case sensitive so searching for 'walk', 'Walk' or 'WALK' will yield exactly the same results.

"; + $output .= "Words excluded from the search"; + $output .= strtr("

Words that frequently occur, typically called 'noise words', are ignored. Example words are 'a', 'at', 'and', 'are', 'as', 'how', 'where', etc. Words shorter than %number letters are also ignored.

", array("%number" => variable_get("minimum_word_size", 2))); + break; + case 'admin/system/modules': + $output = "Enables site wide keyword searching."; + break; + case 'admin/system/modules/search': + $output = "The search engine works by keeping an index of \"interesting\" words. To make sure we only get \"interesting\" words you need to set the following."; + break; + } return $output; } function search_system($field){ - $system["description"] = t("Enables site wide keyword searching."); - $system["admin_help"] = t("The search engine works by keeping an index of \"interesting\" words. To make sure we only get \"interesting\" words you need to set the following."); - return $system[$field]; + $output = ""; + + if ($field == "description") {$output = search_help("admin/system/modules"); } + else if ($field == "admin_help") {$output = search_help("admin/system/modules/queue"); }; + + return $output; } /** -- cgit v1.2.3