diff options
-rw-r--r-- | includes/theme.inc | 31 | ||||
-rw-r--r-- | themes/bluemarine/xtemplate.xtmpl | 2 | ||||
-rw-r--r-- | themes/chameleon/chameleon.theme | 14 | ||||
-rw-r--r-- | themes/engines/xtemplate/xtemplate.engine | 4 | ||||
-rw-r--r-- | themes/pushbutton/xtemplate.xtmpl | 4 |
5 files changed, 27 insertions, 28 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 16c378dc5..a65f8b713 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -26,20 +26,6 @@ define('MARK_UPDATED', 2); */ /** - * Hook Help - returns theme specific help and information. - * - * @param section defines the @a section of the help to be returned. - * - * @return a string containing the help output. - */ -function theme_help($section) { - switch ($section) { - case 'admin/themes#description': - return t('The base theme'); - } -} - -/** * Initialize the theme system by loading the theme. * * @return @@ -395,11 +381,9 @@ function theme_page($content) { $output .= $tabs; } - if ($help = menu_get_active_help()) { - $output .= '<small>'. $help .'</small><hr />'; - } + $output .= theme('help'); - $output .= theme_status_messages(); + $output .= theme('status_messages'); $output .= "\n<!-- begin content -->\n"; $output .= $content; @@ -489,6 +473,17 @@ function theme_breadcrumb($breadcrumb) { } /** + * Return a themed help message. + * + * @return a string containing the helptext for the current page. + */ +function theme_help() { + if ($help = menu_get_active_help()) { + return '<div class="help">'. $help .'</div>'; + } +} + +/** * Return a themed node. * * @param $node diff --git a/themes/bluemarine/xtemplate.xtmpl b/themes/bluemarine/xtemplate.xtmpl index 1c2c69b7e..47f4bae19 100644 --- a/themes/bluemarine/xtemplate.xtmpl +++ b/themes/bluemarine/xtemplate.xtmpl @@ -63,7 +63,7 @@ <!-- END: tabs --> <!-- END: title --> <!-- BEGIN: help --> - <div id="help">{help}</div> + {help} <!-- END: help --> <!-- BEGIN: message --> {message} diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme index 86c774c10..9f73c1fbd 100644 --- a/themes/chameleon/chameleon.theme +++ b/themes/chameleon/chameleon.theme @@ -74,11 +74,9 @@ function chameleon_page($content) { $output .= $tabs; } - if ($help = menu_get_active_help()) { - $output .= "<div id=\"help\">$help</div><hr />"; - } + $output .= theme('help'); - $output .= theme_status_messages(); + $output .= theme('status_messages'); $output .= "\n<!-- begin content -->\n"; $output .= $content; @@ -140,7 +138,6 @@ function chameleon_node($node, $main = 0, $page = 0) { } function chameleon_comment($comment, $link = "") { - $submitted = array(t('By %author at %date', array('%author' => format_name($comment), '%date' => format_date($comment->timestamp. 'small')))); $links = array($link); @@ -152,4 +149,11 @@ function chameleon_comment($comment, $link = "") { return $output; } + +function chameleon_help() { + if ($help = menu_get_active_help()) { + return '<div class="help">'. $help .'</div><hr />'; + } +} + ?> diff --git a/themes/engines/xtemplate/xtemplate.engine b/themes/engines/xtemplate/xtemplate.engine index c7bb12d18..cab654f5e 100644 --- a/themes/engines/xtemplate/xtemplate.engine +++ b/themes/engines/xtemplate/xtemplate.engine @@ -150,12 +150,12 @@ function xtemplate_page($content) { $xtemplate->template->parse("header.title"); } - if ($help = menu_get_active_help()) { + if ($help = theme('help')) { $xtemplate->template->assign("help", $help); $xtemplate->template->parse("header.help"); } - if ($message = theme_status_messages()) { + if ($message = theme('status_messages')) { $xtemplate->template->assign("message", $message); $xtemplate->template->parse("header.message"); } diff --git a/themes/pushbutton/xtemplate.xtmpl b/themes/pushbutton/xtemplate.xtmpl index 1126b0798..ff8be80de 100644 --- a/themes/pushbutton/xtemplate.xtmpl +++ b/themes/pushbutton/xtemplate.xtmpl @@ -79,8 +79,8 @@ <!-- END: tabs --> <!-- END: title --> - <!-- BEGIN: help --> - <div id="help">{help}</div> + <!-- BEGIN: help --> + {help} <!-- END: help --> <!-- BEGIN: message --> {message} |