diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-08-25 16:57:55 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-08-25 16:57:55 +0000 |
commit | 2e22798a8d2fdda43c43936aef8e37c62314aee4 (patch) | |
tree | ee4553a77e97b8491f7977f81c2890c6bf4d8db5 /modules | |
parent | 9abe339c99a5596c8c3503fa62ecd17e4bcb74ab (diff) | |
download | brdo-2e22798a8d2fdda43c43936aef8e37c62314aee4.tar.gz brdo-2e22798a8d2fdda43c43936aef8e37c62314aee4.tar.bz2 |
- More help system updates by Michael F.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/queue.module | 23 | ||||
-rw-r--r-- | modules/search.module | 32 | ||||
-rw-r--r-- | 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 <b>moderation</b>. 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 <b>moderation</b>. 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 @@ <?php // $Id$ -function search_help() { - $output = "<b>". t("Search guidelines") ."</b>"; - $output .= "<p>". 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.") ."</p>"; - $output .= "<b>". t("Words excluded from the search") ."</b>"; - $output .= "<p>". 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))) ."</p>"; +function search_help($section = "admin/search/help") { + $output = ""; + + switch ($section) { + case 'admin/help': + case 'admin/search/help': + $output = "<b>Search guidelines</b>"; + $output .= "<p>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.</p>"; + $output .= "<b>Words excluded from the search</b>"; + $output .= strtr("<p>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.</p>", 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 @@ <?php // $Id$ -function search_help() { - $output = "<b>". t("Search guidelines") ."</b>"; - $output .= "<p>". 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.") ."</p>"; - $output .= "<b>". t("Words excluded from the search") ."</b>"; - $output .= "<p>". 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))) ."</p>"; +function search_help($section = "admin/search/help") { + $output = ""; + + switch ($section) { + case 'admin/help': + case 'admin/search/help': + $output = "<b>Search guidelines</b>"; + $output .= "<p>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.</p>"; + $output .= "<b>Words excluded from the search</b>"; + $output .= strtr("<p>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.</p>", 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; } /** |