You are here

function google_cse_help in Google Custom Search Engine 8.3

Same name and namespace in other branches
  1. 8 google_cse.module \google_cse_help()
  2. 8.2 google_cse.module \google_cse_help()
  3. 7.3 google_cse.module \google_cse_help()
  4. 7.2 google_cse.module \google_cse_help()

Implements hook_help().

File

./google_cse.module, line 15
Display a Google Custom Search Engine (CSE) on your site.

Code

function google_cse_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.google_cse':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Google Custom Search Engine (CSE) is an embedded search engine that can be used to search any set of one or more sites.  No Google API key is required. Read more at <a href="http://www.google.com/cse/." target="blank">http://www.google.com/cse/</a>.') . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<p>' . t('After installing this module, activate Google CSE at <a href="/admin/config/search/pages" target="blank">admin/config/search/pages</a>, optionally setting it as the default search module, and configure it by entering Google\'s unique ID for your CSE.  Once you have granted permission for one or more roles to search  the Google CSE, the search page can be found at search/google, and a separate self-contained search block can also be enabled.') . '</p>';
      $output .= '<b>' . t('Blocks') . '</b>';
      $output .= '<p>' . t('The include Google CSE block can optionally be enabled at admin/structure/block.  The "Google CSE" block provides a search box and also displays the search results.  After entering search terms, the user  will be returned to the same page (via GET request) and the results will be displayed.  Do not allow this Google CSE block to appear on the search/google page, as the search results will fail to display.') . '</p>';
      $output .= '<b>' . t('SiteSearch') . '</b>';
      $output .= '<p>' . t('In addition to the CSE functionality, SiteSearch on one or more domains or URL paths can optionally be configured.  Radio buttons allow users to search on either the SiteSearch option(s) or the CSE, and searches can default to either option.') . '</p>';
      $output .= '<b>' . t('Advanced Settings') . '</b>';
      $output .= '<p>' . t("The collapsed advanced settings on the settings page provide various customizations such as country and language preferences.  For example, with the Locale module enabled, the Google CSE user interface language can be selected dynamically based on the current user's language.") . '</p>';
      return $output;
  }
}