function photos_menu in Album Photos 6.2
Same name and namespace in other branches
- 7.3 photos.module \photos_menu()
File
- ./
photos.module, line 4
Code
function photos_menu() {
$items = array();
$items['photos/image/%'] = array(
'page callback' => 'photos_image_page',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'imageView',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.image.inc',
);
$items['photos/image/%/vote/%'] = array(
'page callback' => 'photos_image_vote',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'imageView',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.image.inc',
);
$items['photos/image/%/update'] = array(
'page callback' => 'photos_edit_update',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'imageEdit',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.edit.inc',
);
$items['photos/image/%/to_sub'] = array(
'title' => 'To sub-album',
'page callback' => 'photos_edit_to_sub',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'imageEdit',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.edit.inc',
);
$items['photos/image/%/delete'] = array(
'page callback' => 'photos_edit_delete',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'imageDelete',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.edit.inc',
);
if (variable_get('photos_access_photos', 1)) {
$items['photos/get/%/%'] = array(
'page callback' => 'photos_image_get',
'page arguments' => array(
2,
3,
),
'access callback' => '_photos_access',
'access arguments' => array(
'imageView',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.image.inc',
);
}
$items['photos/album/%node'] = array(
'page callback' => 'photos_album_page',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'album',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.album.inc',
);
$items['photos/sub_album/%node'] = array(
'page callback' => 'photos_sub_album_page',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'subAlbum',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.album.inc',
);
$items['photos/album/%node/share'] = array(
'title' => 'Share code',
'page callback' => 'photos_album_share',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'album',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.album.inc',
);
$items['photos/sub_album/%node/share'] = array(
'title' => 'Share code',
'page callback' => 'photos_album_share',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'subAlbum',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.album.inc',
);
$items['node/%node/photos'] = array(
'title' => 'Images Management',
'page callback' => 'photos_edit_page',
'page arguments' => array(
1,
),
'access callback' => '_photos_access',
'access arguments' => array(
'editAlbum',
1,
),
'type' => MENU_LOCAL_TASK,
'file' => 'inc/photos.edit.inc',
);
$items['node/%node/photos/cover/%'] = array(
'page callback' => 'photos_edit_cover',
'page arguments' => array(
1,
4,
),
'access callback' => 'node_access',
'access arguments' => array(
'update',
1,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.edit.inc',
);
$items['photos/zoom/%'] = array(
'page callback' => 'photos_down_page',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'imageView',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.down.inc',
);
$items['photos/zoom/%/original'] = array(
'page callback' => 'photos_down_page',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'imageOrig',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.down.inc',
);
$items['admin/settings/photos'] = array(
'title' => 'Photos upload',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'photos_admin_settings',
),
'access arguments' => array(
'administer nodes',
),
'file' => 'inc/photos.admin.inc',
);
$items['admin/settings/photos/update'] = array(
'title' => 'Batch update',
'page callback' => 'photos_admin_update',
'access arguments' => array(
'administer nodes',
),
'file' => 'inc/photos.admin.inc',
);
$items['photos/data/user/%user'] = array(
'page callback' => 'photos_data_user',
'page arguments' => array(
3,
),
'access callback' => 'user_access',
'access arguments' => array(
'view photo',
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.data.inc',
);
$items['photos/data/sub_album/%node/block_new'] = array(
'page callback' => 'photos_data_sub_block',
'page arguments' => array(
3,
4,
),
'access callback' => 'node_access',
'access arguments' => array(
'view',
3,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.data.inc',
);
$items['photos/data/sub_album/%node'] = array(
'page callback' => 'photos_data_album',
'page arguments' => array(
3,
),
'access callback' => 'node_access',
'access arguments' => array(
'view',
3,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.data.inc',
);
$items['photos/data/album/%node'] = array(
'page callback' => 'photos_data_album',
'page arguments' => array(
3,
),
'access callback' => 'node_access',
'access arguments' => array(
'view',
3,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.data.inc',
);
$items['photos'] = array(
'title' => 'Album photos',
'page callback' => 'photos_page_default',
'access arguments' => array(
'view photo',
),
'file' => 'inc/photos.page.inc',
);
$items['photos/image'] = array(
'title' => 'Latest images',
'page callback' => 'photos_page_image',
'access arguments' => array(
'view photo',
),
'file' => 'inc/photos.page.inc',
);
$items['photos/album'] = array(
'title' => 'Latest albums',
'page callback' => 'photos_page_album',
'access arguments' => array(
'view photo',
),
'file' => 'inc/photos.page.inc',
);
$items['photos/user/%user_uid_optional/image'] = array(
'title' => 'My images',
'title callback' => 'photos_page_title',
'title arguments' => array(
2,
t('images'),
),
'page callback' => 'photos_page_image',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'viewUser',
2,
),
'file' => 'inc/photos.page.inc',
);
$items['photos/user/%user_uid_optional/album'] = array(
'title' => 'My albums',
'title callback' => 'photos_page_title',
'title arguments' => array(
2,
t('albums'),
),
'page callback' => 'photos_page_album',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'viewUser',
2,
),
'file' => 'inc/photos.page.inc',
);
if (variable_get('photos_slide', 0)) {
$items['photos/user/%user_uid_optional/slide'] = array(
'title' => 'My slide',
'title callback' => 'photos_page_title',
'title arguments' => array(
2,
t('slide'),
),
'page callback' => 'photos_page_slide',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'viewUser',
2,
),
'file' => 'inc/photos.data.inc',
);
$items['photos/album/%node/slide'] = array(
'page callback' => 'photos_album_slide',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'album',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.album.inc',
);
$items['photos/sub_album/%node/slide'] = array(
'page callback' => 'photos_album_slide',
'page arguments' => array(
2,
),
'access callback' => '_photos_access',
'access arguments' => array(
'subAlbum',
2,
),
'type' => MENU_CALLBACK,
'file' => 'inc/photos.album.inc',
);
}
$items['photos/share'] = array(
'title' => 'Share code',
'page callback' => 'photos_share',
'access arguments' => array(
'create photo',
),
'file' => 'inc/photos.page.inc',
);
$items['photos/upload'] = array(
'title' => 'Image upload',
'page callback' => 'photos_edit_upload',
'access arguments' => array(
'create photo',
),
'file' => 'inc/photos.edit.inc',
'weight' => 9,
);
if (variable_get('photos_upzip', 0)) {
$items['photos/import'] = array(
'title' => 'Import ZIP',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'photos_admin_import',
),
'access arguments' => array(
'administer nodes',
),
'weight' => 10,
'file' => 'inc/photos.admin.inc',
);
}
return $items;
}