From f99830a4985f4a69ef6ffe96a9f2aca734b450af Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 10 Aug 2004 05:44:17 +0000 Subject: - Patch by Al: improved the admin/help pages (first step). --- includes/menu.inc | 14 ++++++++++---- includes/theme.inc | 4 ++++ 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'includes') diff --git a/includes/menu.inc b/includes/menu.inc index d1aa3372c..53f1d2085 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -420,10 +420,16 @@ function menu_get_active_help() { return; } - $return = module_invoke_all('help', $path); - foreach ($return as $item) { - if (!empty($item)) { - $output .= $item ."\n"; + foreach (module_list() as $name) { + if (module_hook($name, 'help')) { + if ($temp = module_invoke($name, 'help', $path)) { + $output .= $temp . "\n"; + } + if (substr($path, 0, 6) == "admin/") { + if (module_invoke($name, 'help', 'admin/help#' . substr($path, 6))) { + $output .= theme("more_help_link", url('admin/help/' . substr($path, 6))); + } + } } } return $output; diff --git a/includes/theme.inc b/includes/theme.inc index 36181fac0..f74700c5a 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -516,6 +516,10 @@ function theme_error($message) { return '
'. $message .'
'; } +function theme_more_help_link($url) { + return '
'; +} + /** * Return code that emits an XML icon. */ -- cgit v1.2.3