You are here

function views_ui_check_advanced_help in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 includes/admin.inc \views_ui_check_advanced_help()
  2. 6.2 includes/admin.inc \views_ui_check_advanced_help()

Check to see if the advanced help module is installed.

If not display 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()
views_ui::list_render in plugins/export_ui/views_ui.class.php
Render all of the rows together.

File

includes/admin.inc, line 87
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'),
      )));
    }
  }
}