From 4131b785f7e36862cbcc937c4a395f0bb5fc5874 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 5 Aug 2003 18:33:39 +0000 Subject: - Help system improvements from Michael. --- modules/cloud.module | 58 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 22 deletions(-) (limited to 'modules/cloud.module') diff --git a/modules/cloud.module b/modules/cloud.module index 9215e2e9b..6cd0b8290 100644 --- a/modules/cloud.module +++ b/modules/cloud.module @@ -1,25 +1,42 @@ ". t("The cloud monitor tracks or crawls other interesting web sites and displays their latest modification dates. It acts as a link watcher such that you can keep an eye on the other sites in our cloud.") ."

"; - } - else { - $output .= "The cloud monitor tracks or crawls other interesting web sites and displays their last modification dates. Visitors to the host site learn about relevant sites and can easily see if there is new content. Here is how it works:"; - $output .= ""; - } - - return $output; +function cloud_help($section = "admin/syndication/cloud/help") { + $output = ""; + + switch ($section) { + case 'admin/help': + case 'admin/cloud/help': + case 'admin/syndication/cloud/help': + $output .= "The cloud monitor tracks or crawls other interesting web sites and displays their last modification dates. Visitors to the host site learn about relevant sites and can easily see if there is new content. Here is how it works:"; + $output .= ""; + break; + case 'cloud': + $output .= "

The cloud monitor tracks or crawls other interesting web sites and displays their latest modification dates. It acts as a link watcher such that you can keep an eye on the other sites in the cloud.

"; + break; + case 'admin/system/modules': + $output = "Tracks other sites and displays last date changed."; + break; + case 'admin/syndication/cloud': + $output = strtr("The cloud monitor tracks or crawls other interesting web sites and displays their last modification dates. Visitors to this site learn about other relevant sites and can easily see if there is new content. To get this working you must setup cron support. To get the site cloud block to display you must turn on the Site bloud block in %block. To go to a monitored site, click on the site name, to immediately load and/or update the record for a site, click on \"update site\", to delete a site go to \"edit site\". ", array("%block" => l(t("block management"), "admin/block") )); + break; + case 'admin/syndication/cloud/add': + $output = "Add a site to the site cloud. Don't forget the \"http://\" for your URLs."; + break; + } + + return t($output); } function cloud_system($field){ - $system["description"] = t("Tracks other sites and displays last date changed."); - return $system[$field]; + $output = ""; + + if ($field == "description") {$output = cloud_help("admin/system/modules");}; + return $output; } function cloud_cron() { @@ -42,12 +59,9 @@ function cloud_link($type) { } if ($type == "admin" && user_access("administer site cloud")) { - $help["general"] = t("The cloud monitor tracks or crawls other interesting web sites and displays their last modification dates. Visitors to the host site learn about relevant sites and can easily see if there is new content. To get the blogroll to work you must setup cron support. To get the site cloud block to display you must turn on the Site cloud block. To go to a monitored site, click on the site name, to load and/or update the record for that site immediately click on \"update site\", to delete the site go to \"edit site\". ", array("%block" => url("admin/block"))); - $help["add"] = t("Add a site to the site cloud. Don't forget the \"http://\" for your URLs."); - menu("admin/syndication", "content syndication", NULL, NULL, 5); - menu("admin/syndication/cloud", "site cloud", "cloud_admin", $help["general"]); - menu("admin/syndication/cloud/add", "add new site", "cloud_admin", $help["add"]); + menu("admin/syndication/cloud", "site cloud", "cloud_admin", cloud_help("admin/syndication/cloud")); + menu("admin/syndication/cloud/add", "add new site", "cloud_admin", cloud_help("admin/syndication/cloud/add")); menu("admin/syndication/cloud/help", "help", "cloud_help", NULL, 9); } @@ -186,7 +200,7 @@ function cloud_page() { if (user_access("access site cloud")) { theme("header"); - theme("box", t("Site cloud"), cloud_help("user") . cloud_list(100)); + theme("box", t("Site cloud"), cloud_help("cloud") . cloud_list(100)); theme("footer"); } } -- cgit v1.2.3