You are here

function getlocations_menu in Get Locations 6.2

Same name and namespace in other branches
  1. 6 getlocations.module \getlocations_menu()
  2. 7.2 getlocations.module \getlocations_menu()
  3. 7 getlocations.module \getlocations_menu()

Implementation of hook_menu().

File

./getlocations.module, line 66
Displays locations on a map. for Drupal 6 using version 3 googlemaps API

Code

function getlocations_menu() {
  $items = array();
  $items['admin/settings/getlocations'] = array(
    'title' => 'Get locations',
    'description' => 'Configure Get locations',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'getlocations_settings_form',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'getlocations.admin.inc',
  );

  // getlocations/node/$nid    # show all location on one node
  $items['getlocations/node/%getlocations_id'] = array(
    'title' => 'Get locations',
    'access callback' => 'getlocations_access_location',
    'page callback' => 'getlocations_nodemap',
    'page arguments' => array(
      2,
    ),
    'type' => MENU_CALLBACK,
  );

  // getlocations/user/$uid    # show all locations for a user
  $items['getlocations/user/%getlocations_id'] = array(
    'title' => 'Get locations',
    'access callback' => 'getlocations_access_user_location',
    'page callback' => 'getlocations_usermap',
    'page arguments' => array(
      2,
    ),
    'type' => MENU_CALLBACK,
  );

  // getlocations/users    # show all locations for all users
  $items['getlocations/users'] = array(
    'title' => 'View all user locations',
    'access callback' => 'getlocations_access_user_location',
    'page callback' => 'getlocations_usersmap',
    'type' => MENU_CALLBACK,
  );

  // getlocations/type/$type     # show all locations of nodes of content-type machine name
  $items['getlocations/type/%getlocations_type'] = array(
    'title' => 'Get locations',
    'access callback' => 'getlocations_access_location',
    'page callback' => 'getlocations_typemap',
    'page arguments' => array(
      2,
      3,
      4,
    ),
    'type' => MENU_CALLBACK,
  );

  // getlocations/lids/1,2,3,4    # show lids
  $items['getlocations/lids/%getlocations_cdints'] = array(
    'title' => 'Get locations',
    'access callback' => 'getlocations_access_location',
    'page callback' => 'getlocations_lids',
    'page arguments' => array(
      2,
    ),
    'type' => MENU_CALLBACK,
  );

  // getlocations/nids/1,2,3,4    # show nids locations
  $items['getlocations/nids/%getlocations_cdints'] = array(
    'title' => 'Get locations',
    'access callback' => 'getlocations_access_location',
    'page callback' => 'getlocations_nids',
    'page arguments' => array(
      2,
    ),
    'type' => MENU_CALLBACK,
  );

  // getlocations/info?lid    # ajax callback to fetch an address
  $items['getlocations/info'] = array(
    'page callback' => 'getlocations_info',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );

  // getlocations/lidinfo?lid    # ajax callback to fetch a link to the 'owner'
  $items['getlocations/lidinfo'] = array(
    'page callback' => 'getlocations_lidinfo',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['getlocations_box'] = array(
    'title' => 'Get locations',
    'access arguments' => array(
      'access getlocations',
    ),
    'page callback' => 'getlocations_box',
    'type' => MENU_CALLBACK,
  );
  return $items;
}