function invite_menu in Invite 7.2
Same name and namespace in other branches
- 5.2 invite.module \invite_menu()
- 5 invite.module \invite_menu()
- 6.2 invite.module \invite_menu()
- 7.4 invite.module \invite_menu()
Implements hook_menu().
File
- ./
invite.module, line 132 - Allows your users to send and track invitations to join your site.
Code
function invite_menu() {
// Admin menu items
$items['admin/people/invites'] = array(
'title' => 'Invites',
'page callback' => 'invite_admin_overview',
'access arguments' => array(
'administer invitations',
),
'type' => MENU_LOCAL_TASK,
'file' => 'invite.admin.inc',
);
$items['admin/config/people/invite'] = array(
'title' => 'Invite',
'description' => 'Modify invitation settings.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'invite_settings',
),
'access arguments' => array(
'administer invitations',
),
'type' => MENU_NORMAL_ITEM,
'weight' => 10,
'file' => 'invite.admin.inc',
);
$items['admin/config/people/invite/details/%user'] = array(
'title callback' => 'invite_admin_details_page_title',
'title arguments' => array(
5,
),
'page callback' => 'invite_admin_details',
'page arguments' => array(
5,
),
'access arguments' => array(
'administer invitations',
),
'type' => MENU_CALLBACK,
'file' => 'invite.admin.inc',
);
// Frontend menu items
$items['invite'] = array(
'title' => 'Invite a friend',
'title callback' => 'invite_page_title',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'invite_form',
),
'access arguments' => array(
'send invitations',
),
'type' => MENU_NORMAL_ITEM,
);
$items['invite/accept/%invite'] = array(
'page callback' => 'invite_accept',
'page arguments' => array(
2,
),
'access callback' => TRUE,
'type' => MENU_CALLBACK,
'file' => 'invite.pages.inc',
);
$items['invite/withdraw/%invite'] = array(
'page callback' => 'drupal_get_form',
'page arguments' => array(
'invite_withdraw',
2,
),
'access callback' => 'invite_withdraw_access',
'access arguments' => array(
2,
),
'type' => MENU_CALLBACK,
);
$items['invite/resend/%invite'] = array(
'title' => 'Resend invitation',
'page callback' => 'invite_resend',
'page arguments' => array(
2,
),
'access arguments' => array(
'send invitations',
),
'type' => MENU_CALLBACK,
'file' => 'invite.pages.inc',
);
$items['invite/invite_user_autocomplete'] = array(
'title' => 'Invite User autocomplete',
'page callback' => 'invite_user_autocomplete',
'access callback' => 'user_access',
'access arguments' => array(
'access user profiles',
),
'type' => MENU_CALLBACK,
'file' => 'invite.pages.inc',
);
// User profile tabs
$items['user/%user/invites'] = array(
'title' => 'Invitations',
'page callback' => 'invite_user_overview',
'page arguments' => array(
'accepted',
1,
),
'access callback' => 'invite_user_access',
'access arguments' => array(
'track invitations',
1,
),
'type' => MENU_LOCAL_TASK,
'file' => 'invite.pages.inc',
);
$items['user/%user/invites/accepted'] = array(
'title' => 'Accepted',
'page callback' => 'invite_user_overview',
'page arguments' => array(
'accepted',
1,
),
'access callback' => 'invite_user_access',
'access arguments' => array(
'track invitations',
1,
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -5,
'file' => 'invite.pages.inc',
);
$items['user/%user/invites/pending'] = array(
'title' => 'Pending',
'page callback' => 'invite_user_overview',
'page arguments' => array(
'pending',
1,
),
'access callback' => 'invite_user_access',
'access arguments' => array(
'track invitations',
1,
),
'type' => MENU_LOCAL_TASK,
'file' => 'invite.pages.inc',
);
$items['user/%user/invites/expired'] = array(
'title' => 'Expired',
'page callback' => 'invite_user_overview',
'page arguments' => array(
'expired',
1,
),
'access callback' => 'invite_user_access',
'access arguments' => array(
'track invitations',
1,
),
'type' => MENU_LOCAL_TASK,
'weight' => 5,
'file' => 'invite.pages.inc',
);
$items['user/%user/invites/new'] = array(
'title' => 'New invitation',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'invite_form',
'page',
array(),
),
'access callback' => 'invite_user_access',
'access arguments' => array(
'send invitations',
1,
),
'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
return $items;
}