From 22c889e7c05b1c2dd98ad5e6b3547234a3f6596f Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 7 Oct 2003 18:16:41 +0000 Subject: - Help system improvements: eliminated the _system hook. Patch by Michael. - Bloggerapi module fixes. Patch by Kjartan. - Coding style fixes. Patch by Michael. --- modules/drupal/drupal.module | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'modules/drupal') diff --git a/modules/drupal/drupal.module b/modules/drupal/drupal.module index 926b1a694..93ebc1205 100644 --- a/modules/drupal/drupal.module +++ b/modules/drupal/drupal.module @@ -4,7 +4,7 @@ function drupal_help($section = "admin/drupal/help") { $output = ""; - switch($section) { + switch ($section) { case 'admin/help': case 'admin/drupal/help': $output .= "

The \"Drupal\" module features a capability whereby other drupal sites may call home to report their existence. In turn, this enables a pod of Drupal sites to find, cooperate and advertise each other.

"; @@ -14,22 +14,21 @@ function drupal_help($section = "admin/drupal/help") { $output .= "

Also note that your installation need not use drupal.org as its directory server. For example, this feature is perfectly capable of aggregating pings from all of your departmental drupal installations sites within an enterprise.

"; $output .= t($output, array("%drupal-sites" => "". t("Drupal sites page") ."", "%Drupal" => "drupal.org", "%xml-rpc" => "XLM-RPC", "%drupal-settings" => l(t("Administration » site configuration » modules » drupal"), "admin/system/modules/drupal"), "%cron" => l(t("cron run"), "admin/system/help#cron") )); break; - case 'admin/system/modules': + case 'admin/system/modules#description': $output = t("Lets users log in using a Drupal ID and can notify drupal.org about your site."); break; case 'admin/system/modules/drupal': - $output = t("Using this your Drupal site can \"call home\" and add itself to the Drupal directory. If you want it to add itself to a different directory server you can change the %Drupal-setting setting -- but the directory server has to be able to handle Drupal XML. To get a full site listing go to the %general and set:", array("%Drupal-setting" => l(t("Drupal XML-RPC server"), "admin/system/modules/drupal"), "%general" => l(t("site configuration"), "admin/system") )); + $output = t("Using this your Drupal site can \"call home\" and add itself to the Drupal directory. If you want it to add itself to a different directory server you can change the %Drupal-setting setting -- but the directory server has to be able to handle Drupal XML. To get a full site listing go to the %general and set:", array("%Drupal-setting" => l(t("Drupal XML-RPC server"), "admin/system/modules/drupal"), "%general" => l(t("site configuration"), "admin/system"))); break; - } - - return $output; -} + case 'user/help': + $site = variable_get("site_name", "this web site"); -function drupal_system($field) { - $output = ""; + $output = "

%drupal is the name of the software which powers %site. There are Drupal web sites all over the world, and many of them share their registration databases so that users may freely login to any Drupal site using a single Drupal ID.

\n"; + $output .= "

So please feel free to login to your account here at %site with a username from another Drupal site. The format of a Drupal ID is similar to an email address: username@server. An example of valid Drupal ID is mwlily@www.drupal.org.

"; - if ($field == "description") { $output = drupal_help("admin/system/modules"); } - else if ($field == "admin_help") { $output = drupal_help("admin/system/modules/drupal"); }; + $output = t($output, array("%drupal" => "Drupal", "%site" => "$site")); + break; + } return $output; } @@ -160,7 +159,7 @@ function drupal_auth($username, $password, $server) { function drupal_page() { theme("header"); - theme("box", "Drupal", drupal_auth_help()); + theme("box", "Drupal", drupal_help("user/help")); theme("footer"); } @@ -179,15 +178,6 @@ function drupal_login($arguments) { } } -function drupal_auth_help() { - $site = variable_get("site_name", "this web site"); - - $output = "

Drupal is the name of the software which powers %s. There are Drupal web sites all over the world, and many of them share their registration databases so that users may freely login to any Drupal site using a single Drupal ID.

\n"; - $output .= "

So please feel free to login to your account here at %s with a username from another Drupal site. The format of a Drupal ID is similar to an email address: username@server. An example of valid Drupal ID is mwlily@www.drupal.org.

"; - - return t($output, array("%s" => "$site")); -} - function drupal_user($type, $edit, $user) { $module = "drupal"; -- cgit v1.2.3