function imagepicker_menu in Image Picker 6.2
Same name and namespace in other branches
- 5.2 imagepicker.module \imagepicker_menu()
- 5 imagepicker.module \imagepicker_menu()
- 7 imagepicker.module \imagepicker_menu()
Implementation of hook_menu().
File
- ./
imagepicker.module, line 52 - Enables permitted roles to upload images for insertion into configured nodes.
Code
function imagepicker_menu() {
$items = array();
$items['imagepicker'] = array(
'title' => 'Image picker',
'page callback' => 'imagepicker_box',
'access callback' => 'imagepicker_access_use',
'type' => MENU_CALLBACK,
'file' => 'imagepicker.upload.inc',
);
$items['imagepicker/upload'] = array(
'title' => 'Upload',
'access callback' => 'imagepicker_access_use',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0,
);
$items['imagepicker/browse'] = array(
'title' => 'Browse',
'page callback' => 'imagepicker_box',
'access callback' => 'imagepicker_access_use',
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
$items['imagepicker/browse_public'] = array(
'title' => 'Browse Public',
'page callback' => 'imagepicker_box',
'access callback' => 'imagepicker_access_use_public',
'type' => MENU_LOCAL_TASK,
'weight' => 3,
);
$items['imagepicker/groups'] = array(
'title' => 'Groups',
'page callback' => 'imagepicker_box',
'access callback' => 'imagepicker_access_use_group',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.group.inc',
'weight' => 4,
);
$items['imagepicker/browse/%imagepicker_id'] = array(
'title' => 'Browse',
'page callback' => 'imagepicker_box',
'access callback' => 'imagepicker_access_use',
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
$items['imagepicker/edit/%imagepicker_id'] = array(
'title' => 'Edit image',
'page callback' => 'imagepicker_box',
'access callback' => 'imagepicker_access_use',
'type' => MENU_CALLBACK,
'file' => 'imagepicker.edit.inc',
);
$items['imagepicker/image/%imagepicker_id'] = array(
'title' => 'Imagepicker',
'page callback' => 'imagepicker_box',
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
$items['imagepicker/image/%imagepicker_id/%'] = array(
'title' => 'Imagepicker',
'page callback' => 'imagepicker_box',
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
// uploadprogress callback
$items['imagepicker/progress'] = array(
'page callback' => 'imagepicker_uploadprogress_callback',
'access arguments' => array(
TRUE,
),
'type' => MENU_CALLBACK,
);
// admin settings
$items[IMAGEPICKER_ADMIN_PATH] = array(
'title' => 'Imagepicker',
'description' => 'Imagepicker settings and administration.',
'page callback' => 'imagepicker_settings_page',
'access callback' => 'imagepicker_access_admin',
'type' => MENU_NORMAL_ITEM,
'file' => 'imagepicker.admin.inc',
'weight' => 0,
);
$items[IMAGEPICKER_ADMIN_PATH . '/general'] = array(
'title' => 'General',
'description' => 'Imagepicker settings.',
'access callback' => 'imagepicker_access_admin',
'page callback' => 'imagepicker_settings_page',
'type' => MENU_DEFAULT_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -10,
);
// admin groups and images
$items[IMAGEPICKER_ADMIN_PATH . '/groups'] = array(
'title' => 'Groups',
'description' => 'Show user groups.',
'access callback' => 'imagepicker_access_admin_group',
'page callback' => 'imagepicker_admin_groups',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -8,
);
$items[IMAGEPICKER_ADMIN_PATH . '/groups/users'] = array(
'title' => 'Users',
'description' => 'Show user groups.',
'access callback' => 'imagepicker_access_admin_group',
'page callback' => 'imagepicker_admin_groups',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -10,
);
$items[IMAGEPICKER_ADMIN_PATH . '/groups/stats'] = array(
'title' => 'Stats',
'description' => 'Show user group stats.',
'access callback' => 'imagepicker_access_admin_group',
'page callback' => 'imagepicker_admin_groups',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -8,
);
$items[IMAGEPICKER_ADMIN_PATH . '/groups/user/%imagepicker_id'] = array(
'title' => 'Groups',
'description' => 'Show user groups.',
'access callback' => 'imagepicker_access_admin_group',
'page callback' => 'imagepicker_admin_groups',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -7,
);
$items[IMAGEPICKER_ADMIN_PATH . '/groups/user/%imagepicker_id/stats'] = array(
'title' => 'Stats',
'description' => 'Show user stats.',
'access callback' => 'imagepicker_access_admin_group',
'page callback' => 'imagepicker_admin_groups',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -8,
);
$items[IMAGEPICKER_ADMIN_PATH . '/groups/autocomplete'] = array(
'access callback' => 'imagepicker_access_admin_group',
'page callback' => 'imagepicker_group_search_autocomplete',
'type' => MENU_CALLBACK,
'file' => 'imagepicker.admin.inc',
);
$items[IMAGEPICKER_ADMIN_PATH . '/images/stats'] = array(
'title' => 'Stats All',
'description' => 'Show user statistics.',
'access callback' => 'imagepicker_access_admin_group',
'page callback' => 'imagepicker_admin_images',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -7,
);
// admin images
$items[IMAGEPICKER_ADMIN_PATH . '/images'] = array(
'title' => 'Images',
'description' => 'Show user images.',
'access callback' => 'imagepicker_access_admin',
'page callback' => 'imagepicker_admin_images',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -9,
);
$items[IMAGEPICKER_ADMIN_PATH . '/images/browse_all'] = array(
'title' => 'Browse All',
'description' => 'Browse user images.',
'access callback' => 'imagepicker_access_admin',
'page callback' => 'imagepicker_admin_images',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -9,
);
$items[IMAGEPICKER_ADMIN_PATH . '/images/list_all'] = array(
'title' => 'List All',
'description' => 'List user images.',
'access callback' => 'imagepicker_access_admin',
'page callback' => 'imagepicker_admin_images',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -8,
);
$items[IMAGEPICKER_ADMIN_PATH . '/images/users'] = array(
'title' => 'Users',
'description' => 'List users.',
'access callback' => 'imagepicker_access_admin',
'page callback' => 'imagepicker_admin_images',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -10,
);
$items[IMAGEPICKER_ADMIN_PATH . '/images/user/%imagepicker_id/browse'] = array(
'title' => 'Browse',
'description' => 'Browse user images.',
'access callback' => 'imagepicker_access_admin',
'page callback' => 'imagepicker_admin_images',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -4,
);
$items[IMAGEPICKER_ADMIN_PATH . '/images/user/%imagepicker_id/browseadmin'] = array(
'title' => 'List',
'description' => 'List user images.',
'access callback' => 'imagepicker_access_admin',
'page callback' => 'imagepicker_admin_images',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -3,
);
$items[IMAGEPICKER_ADMIN_PATH . '/images/user/%imagepicker_id/upload'] = array(
'title' => 'Upload',
'description' => 'Browse user images.',
'access callback' => 'imagepicker_access_admin',
'page callback' => 'imagepicker_admin_images',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -6,
);
$items[IMAGEPICKER_ADMIN_PATH . '/images/user/%imagepicker_id/stats'] = array(
'title' => 'Stats',
'description' => 'Browse user images.',
'access callback' => 'imagepicker_access_admin_group',
'page callback' => 'imagepicker_admin_images',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -2,
);
$items[IMAGEPICKER_ADMIN_PATH . '/images/user/%imagepicker_id/groups'] = array(
'title' => 'Groups',
'description' => 'List user groups.',
'access callback' => 'imagepicker_access_admin_group',
'page callback' => 'imagepicker_admin_images',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -1,
);
$items[IMAGEPICKER_ADMIN_PATH . '/images/autocomplete'] = array(
'access callback' => 'imagepicker_access_admin',
'page callback' => 'imagepicker_user_autocomplete',
'type' => MENU_CALLBACK,
'file' => 'imagepicker.admin.inc',
);
// admin validation
$items[IMAGEPICKER_ADMIN_PATH . '/convert'] = array(
'title' => 'Validate Files',
'description' => 'Validate and convert Imagepicker Files.',
'access callback' => 'imagepicker_access_admin',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'imagepicker_convert_form',
),
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -7,
);
// Import
$items[IMAGEPICKER_ADMIN_PATH . '/import'] = array(
'title' => 'Import',
'description' => 'Manage bulk imports.',
'page callback' => 'imagepicker_admin_import',
'access callback' => 'imagepicker_access_import',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -8,
);
$items[IMAGEPICKER_ADMIN_PATH . '/import/autocomplete'] = array(
'access callback' => 'imagepicker_access_import',
'page callback' => 'imagepicker_user_autocomplete',
'type' => MENU_CALLBACK,
'file' => 'imagepicker.admin.inc',
);
$items[IMAGEPICKER_ADMIN_PATH . '/import/user/%imagepicker_id'] = array(
'title' => 'Import',
'description' => 'Import files.',
'access callback' => 'imagepicker_access_import',
'page callback' => 'imagepicker_admin_import',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.admin.inc',
'weight' => -3,
);
// multitask
$items[IMAGEPICKER_ADMIN_PATH . '/multitask/%/%/%'] = array(
'title' => 'Bulk Operations',
'page callback' => 'imagepicker_multitask',
'page arguments' => array(
4,
5,
6,
),
'access callback' => 'imagepicker_access_admin',
'type' => MENU_CALLBACK,
);
// orphans
$items[IMAGEPICKER_ADMIN_PATH . '/orphans'] = array(
'title' => 'Orphaned images',
'description' => 'Manage orphaned images.',
'page callback' => 'imagepicker_admin_orphans',
'access callback' => 'imagepicker_access_admin',
'type' => MENU_CALLBACK,
'file' => 'imagepicker.admin.inc',
);
$items[IMAGEPICKER_ADMIN_PATH . '/orphans/autocomplete'] = array(
'access callback' => 'imagepicker_access_admin',
'page callback' => 'imagepicker_user_autocomplete',
'type' => MENU_CALLBACK,
'file' => 'imagepicker.admin.inc',
);
// My imagepicker
$items['user/%imagepicker_uid/imagepicker'] = array(
'title' => 'My imagepicker',
'description' => 'Manage your imagepicker files.',
'page callback' => 'imagepicker_user_page',
'page arguments' => array(
1,
),
'access callback' => 'imagepicker_access_user_pages',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.user.inc',
'weight' => 0,
);
$items['user/%imagepicker_uid/imagepicker/upload'] = array(
'title' => 'Upload',
'description' => 'Upload images.',
'page callback' => 'imagepicker_user_page',
'page arguments' => array(
1,
3,
),
'access callback' => 'imagepicker_access_user_pages',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.user.inc',
'weight' => -9,
);
$items['user/%imagepicker_uid/imagepicker/images/browse'] = array(
'title' => 'Browse',
'description' => 'Browse your imagepicker files.',
'page callback' => 'imagepicker_user_page',
'page arguments' => array(
1,
3,
4,
5,
),
'access callback' => 'imagepicker_access_user_pages',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.user.inc',
'weight' => -7,
);
$items['user/%imagepicker_uid/imagepicker/images/browseadmin'] = array(
'title' => 'List',
'description' => 'List your imagepicker files.',
'page callback' => 'imagepicker_user_page',
'page arguments' => array(
1,
3,
4,
5,
),
'access callback' => 'imagepicker_access_user_pages',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.user.inc',
'weight' => -6,
);
// groups
$items['user/%imagepicker_uid/imagepicker/images/browse_public'] = array(
'title' => 'Browse Public',
'description' => 'Browse public imagepicker files.',
'page callback' => 'imagepicker_user_page',
'page arguments' => array(
1,
3,
4,
5,
),
'access callback' => 'imagepicker_access_user_public',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.user.inc',
'weight' => -5,
);
$items['user/%imagepicker_uid/imagepicker/groups/browse'] = array(
'title' => 'Groups',
'description' => 'Manage your imagepicker groups.',
'page callback' => 'imagepicker_user_page',
'page arguments' => array(
1,
3,
4,
5,
),
'access callback' => 'imagepicker_access_user_groups',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.user.inc',
'weight' => -4,
);
$items['user/%imagepicker_uid/imagepicker/stats'] = array(
'title' => 'Stats',
'description' => 'View your imagepicker statistics.',
'page callback' => 'imagepicker_user_page',
'page arguments' => array(
1,
3,
),
'access callback' => 'imagepicker_access_user_groups',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.user.inc',
'weight' => -3,
);
$items['user/%imagepicker_uid/imagepicker/config'] = array(
'title' => 'Config',
'description' => 'Administer user configuration.',
'page callback' => 'imagepicker_user_page',
'page arguments' => array(
1,
3,
),
'access callback' => 'imagepicker_access_user_config',
'type' => MENU_LOCAL_TASK,
'file' => 'imagepicker.user.inc',
'weight' => -2,
);
// multitask
$items['user/%imagepicker_uid/imagepicker/multitask/%/%/%'] = array(
'title' => 'Bulk Operations',
'page callback' => 'imagepicker_multitask',
'page arguments' => array(
4,
5,
6,
),
'access callback' => 'imagepicker_access_user_pages',
'type' => MENU_CALLBACK,
);
return $items;
}