Hi All,
I have this script i'm using to read out 2 folders. The first folder holds the small (thumbnail) images and the 2nd folder the large images.
What happens is when you click lets say image_1.jpg from the small folder it opens up image_1.jpg from the large folder.
What i really would like to see is that if there is a sequence to image_1.jpg (eg. image_1_1.jpg and image_1_2.jpg) those are opened after the click.
I'm stuck..anybody?
Here's the script so far.
Code:<? $folderThumbs = 'IMAGES_SMALL/'; $folderLarge = 'IMAGES_LARGE/'; $thumbs = glob("{$folderThumbs}*.*"); $large = glob("{$folderLarge}*.*"); $numThumbs = count($thumbs); for ($i = 0; $i < $numThumbs; $i++) { $thumb = $thumbs[$i]; $largeImage = str_replace($folderThumbs, $folderLarge, $thumb); if (file_exists($largeImage)) { echo "<a href='{$largeImage}' class='fancybox' rel='group'>"; echo "<img src='{$thumb}' alt='{$thumb}' />"; echo "</a>"; } else { echo "<img src='{$thumb}' alt='{$thumb}' />"; } } ?>


Reply With Quote
Bookmarks