You are here

function imagepicker_user_page in Image Picker 5

Same name and namespace in other branches
  1. 5.2 imagepicker.module \imagepicker_user_page()
  2. 6.2 imagepicker.user.inc \imagepicker_user_page()
  3. 7 imagepicker.user.inc \imagepicker_user_page()
1 string reference to 'imagepicker_user_page'
imagepicker_menu in ./imagepicker.module
Implementation of hook_menu().

File

./imagepicker.module, line 1207
Enables permitted roles to upload images for insertion into configured nodes.

Code

function imagepicker_user_page() {
  $path = drupal_get_path('module', 'imagepicker');
  drupal_add_css($path . '/imagepicker.css');
  $content = theme_imagepicker_user_menu();
  if (arg(3) == 'browse' && !arg(4)) {
    $content .= imagepicker_user_browse();
  }
  elseif (arg(3) == 'browse' && arg(4) == 'admin') {
    $content .= imagepicker_user_browse_admin();
  }
  elseif (arg(3) == 'browse' && arg(4)) {
    $content .= imagepicker_user_view(arg(4));
  }
  elseif (arg(3) == 'edit' && arg(4)) {
    $content .= imagepicker_user_image_edit(arg(4));
  }
  elseif (arg(3) == 'delete' && arg(4)) {

    #$content .= ;
    imagepicker_image_delete(TRUE);
  }
  elseif (arg(3) == 'groups') {
    $content .= imagepicker_user_groups(arg(4), arg(5));
  }
  else {
    $content .= imagepicker_user_upload();
  }
  return $content;
}