You are here

function flickrgallery_menu in FlickrGallery 7.3

Same name and namespace in other branches
  1. 6.2 flickrgallery.module \flickrgallery_menu()
  2. 7 flickrgallery.module \flickrgallery_menu()
  3. 7.2 flickrgallery.module \flickrgallery_menu()

Implements hook_menu().

File

./flickrgallery.module, line 46
This module shows the sets and photo's from a Flickr account

Code

function flickrgallery_menu() {
  $items = array();
  $items['admin/config/media/flickgallery/gallery'] = array(
    'title' => 'Flickr Gallery Settings',
    'description' => 'Configure options for the flickr Gallery module',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'flickrgallery_settings_form',
    ),
    'access arguments' => array(
      'administer flickr settings',
    ),
    'file' => 'includes/flickrgallery.admin.inc',
    'file path' => drupal_get_path('module', 'flickrgallery'),
  );
  $items[variable_get('flickrgallery_path', 'flickr')] = array(
    'title' => variable_get('flickrgallery_title', 'Flickr Gallery'),
    'page callback' => 'flickrgallery_wrapper_albums',
    'access arguments' => array(
      'view photosets',
    ),
    'type' => MENU_NORMAL_ITEM,
    'weight' => -100,
    'file' => 'includes/flickrgallery.pages.inc',
    'file path' => drupal_get_path('module', 'flickrgallery'),
  );
  $set_path = variable_get('flickrgallery_path', 'flickr') . '/set/%';
  $cnt_set_path = count(explode("/", $set_path)) - 1;
  $items[$set_path] = array(
    'title callback' => 'flickrgallery_menu_title_callback',
    'title arguments' => array(
      $cnt_set_path,
    ),
    'page callback' => 'flickrgallery_set',
    'access arguments' => array(
      'view photosets',
    ),
    'page arguments' => array(
      $cnt_set_path,
    ),
    'type' => MENU_CALLBACK,
    'file' => 'includes/flickrgallery.pages.inc',
    'file path' => drupal_get_path('module', 'flickrgallery'),
  );
  return $items;
}