コード例 #1
0
/**
 * Preprocessor for theme('help').
 */
function fubik_preprocess_help(&$vars)
{
    $vars['hook'] = 'help';
    $vars['attr']['id'] = 'help-text';
    $class = 'path-admin-help clear-block toggleable';
    $vars['attr']['class'] = isset($vars['attr']['class']) ? "{$vars['attr']['class']} {$class}" : $class;
    $help = menu_get_active_help();
    if (($test = strip_tags($help)) && !empty($help)) {
        // Thankfully this is static cached.
        $vars['attr']['class'] .= menu_secondary_local_tasks() ? ' with-tabs' : '';
        $vars['is_prose'] = TRUE;
        $vars['layout'] = TRUE;
        $vars['content'] = "<span class='icon'></span>" . $help;
        // Link to help section.
        $item = menu_get_item('admin/help');
        if ($item && $item['path'] === 'admin/help' && $item['access']) {
            $vars['links'] = l(t('More help topics'), 'admin/help');
        }
    }
}
コード例 #2
0
/**
 * Preprocessor for theme('help').
 */
function rubik_preprocess_help(&$vars)
{
    $vars['hook'] = 'help';
    $vars['attr']['id'] = 'rubik-help';
    $vars['attr']['class'] .= 'path-admin-help clear-block toggleable';
    $help = menu_get_active_help();
    if (($test = strip_tags($help)) && !empty($help)) {
        // Thankfully this is static cached.
        $vars['attr']['class'] .= menu_secondary_local_tasks() ? ' with-tabs' : '';
        $vars['is_prose'] = TRUE;
        $vars['layout'] = TRUE;
        $vars['content'] = "<span class='icon'></span>" . $help;
        $vars['links'] = '<label class="breadcrumb-label">' . t('Help text for') . '</label>';
        $vars['links'] .= theme('breadcrumb', drupal_get_breadcrumb(), FALSE);
    }
}
コード例 #3
0
/**
 * Override, make sure Drupal doesn't return empty <P>
 *
 * Return a themed help message.
 *
 * @return a string containing the helptext for the current page.
 */
function blueprint_help()
{
    $help = menu_get_active_help();
    // Drupal sometimes returns empty <p></p> so strip tags to check if empty
    if (strlen(strip_tags($help)) > 1) {
        return '<div class="help">' . $help . '</div>';
    }
}
コード例 #4
0
ファイル: template.php プロジェクト: rasjones/csa
/**
 * Implementation of theme_help().
 */
function csa_base_help()
{
    if ($help = menu_get_active_help()) {
        return '<div class="help"><div class="messages-inner">' . $help . '</div></div>';
    }
}
コード例 #5
0
ファイル: template.php プロジェクト: edwardpku/Atrium
/**
 * Override of theme_help().
 */
function ginkgo_help()
{
    $help = menu_get_active_help();
    $test = strip_tags($help);
    if (!empty($test)) {
        return "<div class='prose'>{$help}</div>";
        $output = "<div class='messages help clear-block'>";
        $output .= "<div class='message-label'>" . t('Need help?') . "</div>";
        $output .= "<div class='message-content filter-text'>{$help}</div>";
        $output .= "</div>";
        return $output;
    }
}
コード例 #6
0
ファイル: template.php プロジェクト: kkaefer/Atrium
/**
 * Override of theme_help().
 */
function ginkgo_help()
{
    if ($help = menu_get_active_help()) {
        return '<div class="help prose">' . $help . '</div>';
    }
}
コード例 #7
0
ファイル: template.php プロジェクト: voidfiles/oocss-drupal
/**
 * Return a themed help message.
 *
 * @return a string containing the helptext for the current page.
 */
function phptemplate_help()
{
    if ($help = menu_get_active_help()) {
        return '<div class="help">' . $help . '</div>';
    }
}