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/poll.module | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'modules/poll.module') diff --git a/modules/poll.module b/modules/poll.module index 74ca02e89..139f83cce 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -137,9 +137,28 @@ function poll_form(&$node, &$help, &$error) { return $output; } -function poll_help() { - $output .= "

Users with the correct ". l("permissions","admin/user/permission") ." can create and/or vote on polls.

Creating a poll is much like creating any other node. Click \"create poll\" in your user box. The title of the poll should be the question, then enter the answers and the \"base\" vote counts. You can also choose the time period over which the vote will run.

The ". l("Poll", "poll") ." item in the navigation links will take you to a page where you can see all the current polls, vote on them (if you haven't already) and view the results.

"; - return t($output); +function poll_help($section = "admin/poll/help") { + $output = ""; + + switch ($section) { + + case 'admin/poll/help': + $output .= "

Users with the correct %permissions can create and/or vote on polls.

"; + $output .= ""; + $output .= "

Creating a poll is much like creating any other node. Click \"create poll\" in your user box. The title of the poll should be the question, then enter the answers and the \"base\" vote counts. You can also choose the time period over which the vote will run.

The %poll item in the navigation links will take you to a page where you can see all the current polls, vote on them (if you haven't already) and view the results.

"; + $output = t($output, array("%permissions" => l(t("permissions"), "admin/user/permission"), "%poll" => l(t("Poll"), "poll") )); + break; + case 'admin/system/modules': + $output = t("Enables your site to capture votes on different topics in the form of multiple choice questions."); + break; + } + + return $output; } function poll_insert($node) { @@ -244,8 +263,11 @@ function poll_perm() { } function poll_system($field){ - $system["description"] = t("Enables your site to capture votes on different topics in the form of multiple choice questions."); - return $system[$field]; + $output = ""; + + if ($field == "description") { $output = poll_help("admin/system/modules"); }; + + return $output; } function poll_teaser($node) { -- cgit v1.2.3