You are here

function lightbox2_check_filefield_image_extension in Lightbox2 6

Same name and namespace in other branches
  1. 8 lightbox2.module \lightbox2_check_filefield_image_extension()
  2. 7.2 lightbox2.module \lightbox2_check_filefield_image_extension()
  3. 7 lightbox2.module \lightbox2_check_filefield_image_extension()

Suitability callback function for the image filefield formatter.

Parameters

$file: The file object, containing filepath, mime type, etc.

$field: CCK field information.

Return value

True if file extension is supported.

1 string reference to 'lightbox2_check_filefield_image_extension'
lightbox2_file_formatter_info in ./lightbox2.module
Implementation of filefield's hook_file_formatter_info().

File

./lightbox2.module, line 1227
Enables the use of lightbox2 which places images above your current page, not within. This frees you from the constraints of the layout, particularly column widths.

Code

function lightbox2_check_filefield_image_extension($file, $field) {
  $ext = array_pop(explode('.', $file->filename));
  return lightbox2_supported_file_extension($ext, 'image');
}