You are here

function visitors_menu in Visitors 7.2

Same name and namespace in other branches
  1. 8 visitors.module \visitors_menu()
  2. 7 visitors.module \visitors_menu()
  3. 7.0 visitors.module \visitors_menu()

Menu callback. Prints a listing of active nodes on the site.

File

./visitors.module, line 49

Code

function visitors_menu() {
  $items = array();
  $items['admin/config/system/visitors'] = array(
    'title' => 'Visitors settings',
    'description' => 'Configure visitors settings.',
    'access arguments' => array(
      'administer visitors',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'visitors_admin_settings',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'forms/admin_settings.inc',
  );
  $items['visitors'] = array(
    'title' => 'Visitors',
    'description' => "Visitors info.",
    'position' => 'left',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'access visitors',
    ),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items['visitors/hits'] = array(
    'title' => 'Recent hits',
    'description' => 'View pages that have recently been visited.',
    'page callback' => 'visitors_recent_hits',
    'access arguments' => array(
      'access visitors recent hits',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['visitors/pages'] = array(
    'title' => 'Top pages',
    'description' => 'View pages that have been hit frequently.',
    'page callback' => 'visitors_top_pages',
    'access arguments' => array(
      'access visitors top pages',
    ),
    'weight' => 1,
    'file' => 'visitors.admin.inc',
  );
  $items['visitors/monthly_history'] = array(
    'title' => 'Monthly history',
    'description' => 'View pages count per month.',
    'page callback' => 'visitors_monthly_history',
    'access arguments' => array(
      'access visitors monthly history',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['visitors/monthly_history/chart'] = array(
    'title' => 'Monthly history',
    'description' => 'View pages count per month.',
    'page callback' => 'chart_visitors_monthly_history',
    'access arguments' => array(
      'access visitors monthly history',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['visitors/days_of_month'] = array(
    'title' => 'Days of month',
    'description' => 'View pages count per day of month.',
    'page callback' => 'visitors_days_of_month',
    'access arguments' => array(
      'access visitors days of month',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['visitors/days_of_month/chart'] = array(
    'title' => 'Days of month',
    'description' => 'View pages count per day of month.',
    'page callback' => 'chart_visitors_days_of_month',
    'access arguments' => array(
      'access visitors days of month',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['visitors/days_of_week'] = array(
    'title' => 'Days of week',
    'description' => 'View pages count per day of week.',
    'page callback' => 'visitors_days_of_week',
    'access arguments' => array(
      'access visitors days of week',
    ),
    'file' => 'visitors.admin.inc',
  );
  $items['visitors/days_of_week/chart'] = array(
    'title' => 'Days of week',
    'description' => 'View pages count per day of week.',
    'page callback' => 'chart_visitors_days_of_week',
    'access arguments' => array(
      'access visitors days of week',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['visitors/hours'] = array(
    'title' => 'Hours',
    'description' => 'View pages count per hour.',
    'page callback' => 'visitors_hours',
    'access arguments' => array(
      'access visitors hours',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['visitors/hours/chart'] = array(
    'title' => 'Hours',
    'description' => 'View pages count per hour.',
    'page callback' => 'chart_visitors_hours',
    'access arguments' => array(
      'access visitors hours',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['visitors/hosts'] = array(
    'title' => 'Hosts',
    'description' => 'View pages count per host.',
    'page callback' => 'visitors_hosts',
    'access arguments' => array(
      'access visitors hosts',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['visitors/user_activity'] = array(
    'title' => 'User activity',
    'description' => 'View user activity report (hits, nodes, comments).',
    'page callback' => 'visitors_user_activity',
    'access arguments' => array(
      'access visitors user activity',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['visitors/referers'] = array(
    'title' => 'Referers',
    'description' => 'View referer list.',
    'page callback' => 'visitors_referer_list',
    'access arguments' => array(
      'access visitors referers',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['visitors/hosts/%'] = array(
    'title' => 'Hits',
    'description' => 'View host access log.',
    'page callback' => 'visitors_host_hits',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'access visitors host details',
    ),
    'file' => 'visitors.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['visitors/hits/%'] = array(
    'title' => 'Details',
    'description' => 'View access log.',
    'page callback' => 'visitors_hit_details',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'access visitors hit details',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'visitors.admin.inc',
  );
  $items['node/%node/visitors'] = array(
    'title' => 'Visitors',
    'page callback' => 'visitors_node',
    'access callback' => 'user_access',
    'access arguments' => array(
      'access visitors node',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
    'file' => 'visitors.admin.inc',
  );
  return $items;
}