function lightbox2_imagecache_create_url in Lightbox2 5.2
Implementation of the imagecache_create_url() function for integration with imagecache module versions prior to imagecache 2.
1 call to lightbox2_imagecache_create_url()
- theme_imagefield_image_imagecache_lightbox2 in ./
lightbox2.module - Generate the HTML output for imagefield + imagecache images so they can be opened in a lightbox by clicking on the image on the node page or in a view.
File
- ./
lightbox2.module, line 2185 - 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_imagecache_create_url($preset, $filepath) {
if (function_exists('imagecache_create_url')) {
return imagecache_create_url($preset, $filepath);
}
else {
$dirpath = file_directory_path();
$dirlen = drupal_strlen($dirpath);
if (drupal_substr($filepath, 0, $dirlen + 1) == $dirpath . '/') {
$filepath = drupal_substr($filepath, $dirlen + 1);
}
return file_create_url(file_directory_path() . '/imagecache/' . $preset . '/' . $filepath);
}
}