You are here

function imagepicker_postlet_menu in Image Picker 6.2

Implementation of hook_menu().

File

contribs/imagepicker_postlet/imagepicker_postlet.module, line 36
Enables upload of images using Postlet java applet. http://www.postlet.com/ http://sourceforge.net/projects/postlet/

Code

function imagepicker_postlet_menu() {
  $items = array();

  // admin
  $items[IMAGEPICKER_ADMIN_PATH . '/images/user/%imagepicker_id/upload_postlet'] = array(
    'title' => 'Multi Upload',
    'description' => 'Browse user images.',
    'access arguments' => array(
      'administer imagepicker',
    ),
    'page callback' => 'imagepicker_postlet_admin_page',
    'page arguments' => array(
      5,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => -5,
  );

  //callback from postlet in admin
  $items['imagepicker_postlet/admin/%imagepicker_id/process'] = array(
    'title' => 'Multi Upload process',
    'page callback' => 'imagepicker_postlet_do',
    'page arguments' => array(
      1,
      2,
    ),
    'access arguments' => array(
      'administer imagepicker',
    ),
    'type' => MENU_CALLBACK,
  );

  // My imagepicker and iframe
  $postlet_ok = imagepicker_postlet_check_ok();
  if ($postlet_ok) {
    if (variable_get('imagepicker_account_enabled', 1)) {
      $items['user/%imagepicker_uid/imagepicker/upload_postlet'] = array(
        'title' => 'Multi Upload',
        'description' => 'Upload images with java applet.',
        'page callback' => 'imagepicker_postlet_user_page',
        'access arguments' => array(
          'access own imagepicker',
        ),
        'type' => MENU_LOCAL_TASK,
        'weight' => -8,
      );

      //callback from postlet in user
      $items['imagepicker_postlet/user/%imagepicker_uid/process'] = array(
        'title' => 'Multi Upload process',
        'page callback' => 'imagepicker_postlet_do',
        'page arguments' => array(
          1,
          2,
        ),
        'access arguments' => array(
          'access own imagepicker',
        ),
        'type' => MENU_CALLBACK,
      );
    }

    // iframe
    $items['imagepicker/upload_postlet'] = array(
      'title' => 'Multi Upload',
      #'page callback'    => 'imagepicker_postlet_page',
      'page callback' => 'imagepicker_box',
      'access arguments' => array(
        'use imagepicker',
      ),
      'type' => MENU_LOCAL_TASK,
      'weight' => 1,
    );

    //callback from postlet in iframe
    $items['imagepicker_postlet/iframe/%imagepicker_uid/process'] = array(
      'title' => 'Multi Upload process',
      'page callback' => 'imagepicker_postlet_do',
      'page arguments' => array(
        1,
        2,
      ),
      'access arguments' => array(
        'use imagepicker',
      ),
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}