I am using a php lightbox (this one - http://www.fatbellyman.com/webstuff/lightbox_gallery/index.php) to automatically display thumbnails and images. I would like to have the titles and image descriptions display on the larger lightbox images, pulled from a separate list (text file?). If it is possible to do this without using a database that would be best.
This is on my gallery page:
<?php include 'lightbox_display_function.php'; ?>
<?php lightbox_display('apparel/soiled/icarus/', 'lightbox[icarus]'); ?>
And this is the lightbox_display_function.php:
<?php function lightbox_display($dir_to_search, $rel){
$image_dir = $dir_to_search;
$dir_to_search = scandir($dir_to_search);
$image_exts = array('gif', 'jpg', 'jpeg', 'png');
$excluded_filename = '_t';
foreach ($dir_to_search as $image_file){
$dot = strrpos($image_file, '.');
$filename = substr($image_file, 0, $dot);
$filetype = substr($image_file, $dot+1);
$thumbnail_file = strrpos($filename, $excluded_filename);
if ((!$thumbnail_file) and array_search($filetype, $image_exts) !== false){
echo "<a href='".$image_dir.$image_file."' rel='".$rel."'>
<img src='".$image_dir.$filename."_t.".$filetype."' alt='".$filename."' width='70' height='70' title='$filename'/>
</a>"."
";
}
}
}