You are here

function elasticsearch_connector_statistics_help in Elasticsearch Connector 7

Same name and namespace in other branches
  1. 7.5 modules/elasticsearch_connector_statistics/elasticsearch_connector_statistics.module \elasticsearch_connector_statistics_help()
  2. 7.2 modules/elasticsearch_connector_statistics/elasticsearch_connector_statistics.module \elasticsearch_connector_statistics_help()

Implements hook_help().

File

modules/elasticsearch_connector_statistics/elasticsearch_connector_statistics.module, line 14
Logs and displays access statistics for a site.

Code

function elasticsearch_connector_statistics_help($path, $arg) {
  $settings_path = elasticsearch_connector_main_settings_path();
  switch ($path) {
    case 'admin/help#elasticsearch_connector_statistics':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The Elasticsearch Connector Statistics module shows you how often a given page is viewed, who viewed it, the previous page the user visited (referrer URL), and when it was viewed. These statistics are useful in determining how users are visiting and navigating your site.') . '</p>';
      $output .= '<h3>' . t('Uses') . '</h3>';
      $output .= '<dl>';
      $output .= '<dt>' . t('Managing logs') . '</dt>';
      $output .= '<dd>' . t('To enable collection of statistics, the <em>Enable access log</em> checkbox on the <a href="@statistics-settings">Elasticsearch Connector Statistics settings page</a> must be checked. The <em>Elasticsearch TTL Interval</em> setting on the settings page specifies the TTL of entries before they are deleted.', array(
        '@statistics-settings' => url($settings_path . '/statistics'),
      )) . '</dd>';
      $output .= '<dt>' . t('Viewing site usage') . '</dt>';
      $output .= '<dd>' . t('The Statistics module can help you break down details about your users and how they are using the site. The module offers five reports:');
      $output .= '<ul><li>' . t('<a href="@recent-hits">Recent hits</a> displays information about the latest activity on your site, including the URL and title of the page that was accessed, the user name (if available) and the IP address of the viewer.', array(
        '@recent-hits' => url('admin/reports/ecs-hits'),
      )) . '</li>';
      $output .= '<li>' . t('<a href="@top-referrers">Top referrers</a> displays where visitors came from (referrer URL).', array(
        '@top-referrers' => url('admin/reports/ecs-referrers'),
      )) . '</li>';
      $output .= '<li>' . t('<a href="@top-pages">Top pages</a> displays a list of pages ordered by how often they were viewed.', array(
        '@top-pages' => url('admin/reports/ecs-pages'),
      )) . '</li>';
      $output .= '<li>' . t('<a href="@top-ip">Top IP</a> displays a list of most hit IPs.', array(
        '@top-ip' => url('admin/reports/ecs-ip'),
      )) . '</li>';
      $output .= '<li>' . t('<a href="@top-visitors">Top visitors</a> shows you the most active visitors for your site and allows you to ban abusive visitors.', array(
        '@top-visitors' => url('admin/reports/ecs-visitors'),
      )) . '</li></ul>';
      return $output;
    case $settings_path . '/statistics':
      return '<p>' . t('Settings for the statistical information that Drupal will keep about the site. See <a href="@statistics">site statistics</a> for the actual information.', array(
        '@statistics' => url('admin/reports/ecs-hits'),
      )) . '</p>';
    case 'admin/reports/ecs-hits':
      return '<p>' . t("This page displays the site's most recent hits.") . '</p>';
    case 'admin/reports/ecs-ip':
      return '<p>' . t("This Top IP displays the site's most recent hits groupped by IP.") . '</p>';
    case 'admin/reports/ecs-referrers':
      return '<p>' . t('This page displays all external referrers, or external references to your website.') . '</p>';
    case 'admin/reports/ecs-visitors':
      return '<p>' . t("When you ban a visitor, you prevent the visitor's IP address from accessing your site. Unlike blocking a user, banning a visitor works even for anonymous users. This is most commonly used to block resource-intensive bots or web crawlers.") . '</p>';
  }
}