You are here

function statistics_menu in Drupal 7

Same name and namespace in other branches
  1. 4 modules/statistics.module \statistics_menu()
  2. 5 modules/statistics/statistics.module \statistics_menu()
  3. 6 modules/statistics/statistics.module \statistics_menu()

Implements hook_menu().

File

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

Code

function statistics_menu() {
  $items['admin/reports/hits'] = array(
    'title' => 'Recent hits',
    'description' => 'View pages that have recently been visited.',
    'page callback' => 'statistics_recent_hits',
    'access arguments' => array(
      'access statistics',
    ),
    'file' => 'statistics.admin.inc',
  );
  $items['admin/reports/pages'] = array(
    'title' => 'Top pages',
    'description' => 'View pages that have been hit frequently.',
    'page callback' => 'statistics_top_pages',
    'access arguments' => array(
      'access statistics',
    ),
    'weight' => 1,
    'file' => 'statistics.admin.inc',
  );
  $items['admin/reports/visitors'] = array(
    'title' => 'Top visitors',
    'description' => 'View visitors that hit many pages.',
    'page callback' => 'statistics_top_visitors',
    'access arguments' => array(
      'access statistics',
    ),
    'weight' => 2,
    'file' => 'statistics.admin.inc',
  );
  $items['admin/reports/referrers'] = array(
    'title' => 'Top referrers',
    'description' => 'View top referrers.',
    'page callback' => 'statistics_top_referrers',
    'access arguments' => array(
      'access statistics',
    ),
    'file' => 'statistics.admin.inc',
  );
  $items['admin/reports/access/%'] = array(
    'title' => 'Details',
    'description' => 'View access log.',
    'page callback' => 'statistics_access_log',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'access statistics',
    ),
    'file' => 'statistics.admin.inc',
  );
  $items['admin/config/system/statistics'] = array(
    'title' => 'Statistics',
    'description' => 'Control details about what and how your site logs access statistics.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'statistics_settings_form',
    ),
    'access arguments' => array(
      'administer statistics',
    ),
    'file' => 'statistics.admin.inc',
    'weight' => -15,
  );
  $items['user/%user/track/navigation'] = array(
    'title' => 'Track page visits',
    'page callback' => 'statistics_user_tracker',
    'access callback' => 'user_access',
    'access arguments' => array(
      'access statistics',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
    'file' => 'statistics.pages.inc',
  );
  $items['node/%node/track'] = array(
    'title' => 'Track',
    'page callback' => 'statistics_node_tracker',
    'access callback' => 'user_access',
    'access arguments' => array(
      'access statistics',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
    'file' => 'statistics.pages.inc',
  );
  return $items;
}