You are here

function _fupload_imagepreview in Image FUpload 6.2

Same name and namespace in other branches
  1. 6.3 includes/images.previewlist.inc \_fupload_imagepreview()
  2. 6.3 includes/images.previewlist.image.inc \_fupload_imagepreview()
  3. 6 includes/images.previewlist.inc \_fupload_imagepreview()
1 call to _fupload_imagepreview()
fupload_list_images in includes/images.previewlist.inc

File

includes/images.previewlist.inc, line 111

Code

function _fupload_imagepreview($node_image, $node_type) {
  $image_node_types = variable_get('image_node_types', array());
  $attributes = variable_get('fupload_previewlist_img_attributes', '');

  /* need to split image module and other cck related imagemodules to be able to provide the right
   *   preview handling */
  switch ($node_type) {
    case 'image':
      if (!empty($image_node_types['image']['imagecache_preset'])) {

        // using ImageCache
        $content = theme('imagecache', $image_node_types['image']['imagecache_preset'], $node_image->images['_original'], $node_image->title, $node_image->title, $attributes);
      }
      else {

        // using a ready-to-use Image size of Image module
        $image = $node_image->images[$image_node_types['image']['image_selection']];
        $content = theme('fupload_imagepreview_img', $image, image_get_info($image), $node_image, $attributes);
      }
      break;
    default:
      $content = "blablablqqqqqqqqqqe";
      break;
  }
  return $content;
}