You are here

function lightbox2_check_filefield_extension in Lightbox2 8

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

Suitability callback function for the 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_extension'
lightbox2_file_formatter_info in ./lightbox2.module
Implementation of filefield's hook_file_formatter_info().

File

./lightbox2.module, line 1510
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_extension($file, $field) {
  $ext = array_pop(explode('.', $file->filename));
  return lightbox2_supported_file_extension($ext);
}