function views_ui_check_advanced_help

3.x admin.inc views_ui_check_advanced_help()
2.x 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.

1 call to views_ui_check_advanced_help()

File

includes/admin.inc, line 85
Provides the Views' administrative interface.

Code

function views_ui_check_advanced_help() {
  if (!variable_get('views_ui_show_advanced_help_warning', TRUE)) {
    return;
  }

  if (!module_exists('advanced_help')) {
    $filename = db_query_range("SELECT filename FROM {system} WHERE type = 'module' AND name = 'advanced_help'", 0, 1)
      ->fetchField();
    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">You can disable this message at the Views settings page.</a>', array('@modules' => url('admin/modules'), '@hide' => url('admin/structure/views/settings'))));
    }
    else {
      drupal_set_message(t('If you install the advanced help module from !href, Views will provide more and better help. <a href="@hide">You can disable this message at the Views settings page.</a>', array('!href' => l('http://drupal.org/project/advanced_help', 'http://drupal.org/project/advanced_help'), '@hide' => url('admin/structure/views/settings'))));
    }
  }
}