You are here

function browscap_menu in Browscap 6

Same name and namespace in other branches
  1. 8 browscap.module \browscap_menu()
  2. 5 browscap.module \browscap_menu()
  3. 6.2 browscap.module \browscap_menu()
  4. 7.2 browscap.module \browscap_menu()
  5. 7 browscap.module \browscap_menu()

Implementation of hook_menu().

File

./browscap.module, line 25
Replacement for PHP's get_browser() function.

Code

function browscap_menu() {
  $items['admin/settings/browscap'] = array(
    'title' => 'Browscap',
    'description' => 'Configure user agent monitoring and browscap information settings.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'browscap_settings_form',
    ),
    'access arguments' => array(
      'administer browscap',
    ),
    'file' => 'browscap.admin.inc',
  );
  $items['admin/reports/browscap'] = array(
    'title' => 'Browscap',
    'description' => 'Browser-specific site statistics.',
    'page callback' => 'browscap_top_useragents',
    'page arguments' => array(
      'all',
    ),
    'access arguments' => array(
      'view browscap reports',
    ),
    'file' => 'browscap.reports.inc',
    'weight' => 5,
  );
  $items['admin/reports/browscap/useragents'] = array(
    'title' => 'All',
    'access arguments' => array(
      'view browscap reports',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 1,
  );
  $items['admin/reports/browscap/browsers'] = array(
    'title' => 'Browsers',
    'page callback' => 'browscap_top_useragents',
    'page arguments' => array(
      'browsers',
    ),
    'access arguments' => array(
      'view browscap reports',
    ),
    'file' => 'browscap.reports.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
  );
  $items['admin/reports/browscap/crawlers'] = array(
    'title' => 'Crawlers',
    'page callback' => 'browscap_top_useragents',
    'page arguments' => array(
      'crawlers',
    ),
    'access arguments' => array(
      'view browscap reports',
    ),
    'file' => 'browscap.reports.inc',
    'type' => MENU_LOCAL_TASK,
    'weight' => 3,
  );
  $items['admin/reports/browscap/useragent/%'] = array(
    'title' => 'Useragent details',
    'page callback' => 'browscap_useragent_properties',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'view browscap reports',
    ),
    'file' => 'browscap.user_agent.inc',
  );
  return $items;
}