You are here

function google_appliance_block_info in Google Search Appliance 7

Implements hook_block_info().

File

./google_appliance.module, line 129
Google Appliance module enables searching via a dedicated Google Search Appliance hardware device. See README.txt and the help page at admin/help/google_appliance.

Code

function google_appliance_block_info() {
  $blocks = array();
  $settings = _google_appliance_get_settings();

  // Onebox blocks.
  foreach ($settings['onebox_modules'] as $module) {
    $blocks[$module] = array(
      'info' => t('Google Appliance Onebox: @module', array(
        '@module' => $module,
      )),
      'cache' => DRUPAL_NO_CACHE,
      'visibility' => 1,
      'pages' => 'gsearch*',
    );
  }

  // block search form
  $blocks['ga_block_search_form'] = array(
    'info' => t('Google Appliance search form'),
    'cache' => DRUPAL_NO_CACHE,
  );

  // related searches block
  $blocks['ga_related_searches'] = array(
    'info' => t('Google Appliance related searches'),
    'cache' => DRUPAL_NO_CACHE,
    // set default visibility to appear only on results pages (just a suggestion)
    'visibility' => 1,
    'pages' => $settings['drupal_path'] . '*',
  );
  return $blocks;
}