function views_ui_check_advanced_help

Same name in other branches
  1. 7.x-3.x includes/admin.inc \views_ui_check_advanced_help()

Check to see if the advanced help module is installed, and if not put up a message.

Only call this function if the user is already in a position for this to be useful.

2 calls to views_ui_check_advanced_help()
views_ui_edit_page in includes/admin.inc
The main view edit page
views_ui_list_views in includes/admin.inc
Page callback to list views in the system.

File

includes/admin.inc, line 27

Code

function views_ui_check_advanced_help() {
    if (variable_get('views_hide_help_message', FALSE)) {
        return;
    }
    if (!module_exists('advanced_help')) {
        $filename = db_result(db_query("SELECT filename FROM {system} WHERE type = 'module' AND name = 'advanced_help'"));
        if ($filename && file_exists($filename)) {
            drupal_set_message(t('If you <a href="@modules">enable the advanced help module</a>, Views will provide more and better help. <a href="@hide">Hide this message.</a>', array(
                '@modules' => url('admin/build/modules'),
                '@hide' => url('admin/build/views/tools'),
            )));
        }
        else {
            drupal_set_message(t('If you install the advanced help module from !href, Views will provide more and better help. <a href="@hide">Hide this message.</a>', array(
                '!href' => l('http://drupal.org/project/advanced_help', 'http://drupal.org/project/advanced_help'),
                '@hide' => url('admin/build/views/tools'),
            )));
        }
    }
}