? 271694_drupalorg_better_help_no_search.patch Index: drupalorg.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/drupalorg/drupalorg.module,v retrieving revision 1.19 diff -u -p -r1.19 drupalorg.module --- drupalorg.module 12 Apr 2008 19:57:55 -0000 1.19 +++ drupalorg.module 22 Jun 2008 14:10:26 -0000 @@ -153,3 +153,42 @@ function drupalorg_project_page_link_alt // Link to security handbook page. $all_links['support']['links']['report_security_issue'] = l(t('Report a security issue'), 'security-team'); } + +/** + * Implementation of hook_block(). + */ +function drupalorg_block($op = 'list', $delta = 0, $edit = array()) { + if ($op == 'list') { + $blocks[0] = array('info' => t('External/Alternate Search Advice'), + 'weight' => 0, 'enabled' => 0, 'region' => 'header'); + return $blocks; + } + else if ($op == 'view') { + switch ($delta) { + case 0: + $block = array('subject' => t('Search Engine'), + 'content' => drupalorg_display_block_external_search()); + break; + } + return $block; + } +} + + +/** + * Body for external search block + */ +function drupalorg_display_block_external_search() { + if (!user_access('search content')) { + $form = '
'; + $message = 'Due to load issues the Drupal.org search occasionally has to be disabled. When this happens, you can use external search engines and a modifier like "site:drupal.org" to refine your results to Drupal. For more information see the infrastructure queue
.'; + return $form . $message; + } +} \ No newline at end of file