You are here

function ad_menu in Advertisement 6.3

Same name and namespace in other branches
  1. 5.2 ad.module \ad_menu()
  2. 5 ad.module \ad_menu()
  3. 6 ad.module \ad_menu()
  4. 6.2 ad.module \ad_menu()
  5. 7.3 ad.module \ad_menu()
  6. 7 ad.module \ad_menu()

Implementation of hook_menu().

File

./ad.module, line 1003

Code

function ad_menu() {
  $items = array();
  $items['admin/content/ad'] = array(
    'title' => 'Ads',
    'page callback' => 'ad_admin_list',
    'access arguments' => array(
      'administer advertisements',
    ),
    'description' => 'Configure and manage your advertising system.',
    'file' => 'ad.admin.inc',
  );
  $items['admin/content/ad/list'] = array(
    'title' => 'List',
    'page callback' => 'ad_admin_list',
    'access arguments' => array(
      'administer advertisements',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'file' => 'ad.admin.inc',
  );
  $items['admin/content/ad/configure'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ad_admin_configure_settings',
    ),
    'access arguments' => array(
      'administer advertisements',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 3,
    'file' => 'ad.admin.inc',
  );
  $items['node/add/ad/ahah'] = array(
    'access arguments' => array(
      'create advertisements',
    ),
    'page callback' => 'ad_form_ahah',
    'type' => MENU_CALLBACK,
  );
  ad_menu_add_global_settings($items);
  $items['admin/content/ad/groups'] = array(
    'title' => 'Ad groups',
    'page callback' => 'ad_admin_groups_list',
    'access arguments' => array(
      'administer advertisements',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 5,
    'file' => 'ad.admin.inc',
  );
  $items['admin/content/ad/groups/list'] = array(
    'title' => 'List',
    'page callback' => 'ad_admin_groups_list',
    'access arguments' => array(
      'administer advertisements',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
    'file' => 'ad.admin.inc',
  );
  $items['admin/content/ad/groups/add'] = array(
    'title' => 'Create group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ad_admin_group_form',
    ),
    'access arguments' => array(
      'administer advertisements',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 3,
    'file' => 'ad.admin.inc',
  );
  $items["admin/content/ad/groups/%ad_group/edit"] = array(
    'title' => 'Edit group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ad_admin_group_form',
      4,
    ),
    'access arguments' => array(
      'administer advertisements',
    ),
    'weight' => 1,
    'file' => 'ad.admin.inc',
  );
  $items["admin/content/ad/groups/%ad_group/delete"] = array(
    'title' => 'Delete group',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ad_confirm_group_delete',
      4,
    ),
    'access arguments' => array(
      'administer advertisements',
    ),
    'weight' => 2,
    'file' => 'ad.admin.inc',
  );
  $items['admin/content/ad/configure/global'] = array(
    'title' => 'Global settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'ad_admin_configure_settings',
    ),
    'access arguments' => array(
      'administer advertisements',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
    'file' => 'ad.admin.inc',
  );
  $items["node/%node/details/%"] = array(
    'title' => 'Click details',
    'page callback' => 'ad_click_details',
    'page arguments' => array(
      1,
      3,
    ),
    'access arguments' => array(
      1,
      'access click history',
    ),
    'access callback' => 'ad_permission',
    'type' => MENU_CALLBACK,
    'file' => 'ad.pages.inc',
  );
  $items["node/%node/activity"] = array(
    'title' => t('Activity log'),
    'page callback' => 'ad_activity_details',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      1,
      'access activity log',
    ),
    'access callback' => 'ad_permission',
    'type' => MENU_LOCAL_TASK,
    'file' => 'ad.pages.inc',
  );
  $items["ad/redirect/%"] = array(
    'access arguments' => array(
      'show advertisements',
    ),
    'type' => MENU_CALLBACK,
    'page callback' => 'ad_redirect',
    'page arguments' => array(
      2,
    ),
  );
  return $items;
}