statistics_menu

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/statistics/statistics.module, строка 101

Версии
5
statistics_menu($may_cache)
6
statistics_menu()

Реализация hook_menu().

Код

<?php
function statistics_menu($may_cache) {
  $items = array();

  $access = user_access('access statistics');
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/logs/hits',
      'title' => t('Recent hits'),
      'description' => t('View pages that have recently been visited.'),
      'callback' => 'statistics_recent_hits',
      'access' => $access);
    $items[] = array(
      'path' => 'admin/logs/pages',
      'title' => t('Top pages'),
      'description' => t('View pages that have been hit frequently.'),
      'callback' => 'statistics_top_pages',
      'access' => $access,
      'weight' => 1);
    $items[] = array(
      'path' => 'admin/logs/visitors',
      'title' => t('Top visitors'),
      'description' => t('View visitors that hit many pages.'),
      'callback' => 'statistics_top_visitors',
      'access' => $access,
      'weight' => 2);
    $items[] = array(
      'path' => 'admin/logs/referrers',
      'title' => t('Top referrers'),
      'description' => t('View top referrers.'),
      'callback' => 'statistics_top_referrers',
      'access' => $access);
    $items[] = array(
      'path' => 'admin/logs/access',
      'title' => t('Details'),
      'description' => t('View access log.'),
      'callback' => 'statistics_access_log',
      'access' => $access,
      'type' => MENU_CALLBACK);
    $items[] = array(
      'path' => 'admin/logs/settings',
      'title' => t('Access log settings'),
      'description' => t('Control details about what and how your site logs.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array('statistics_access_logging_settings'),
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
      'weight' => 3);
  }
  else {
    if (arg(0) == 'user' && is_numeric(arg(1)) && variable_get('statistics_enable_access_log', 0)) {
      $items[] = array(
        'path' => 'user/'. arg(1) .'/track/navigation',
        'title' => t('Track page visits'),
        'callback' => 'statistics_user_tracker',
        'access' => $access,
        'type' => MENU_LOCAL_TASK,
        'weight' => 2);
    }
    if (arg(0) == 'node' && is_numeric(arg(1)) && variable_get('statistics_enable_access_log', 0)) {
      $items[] = array(
        'path' => 'node/'. arg(1) .'/track',
        'title' => t('Track'),
        'callback' => 'statistics_node_tracker',
        'access' => $access,
        'type' => MENU_LOCAL_TASK,
        'weight' => 2);
    }
  }

  return $items;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему