Results 1 to 2 of 2

Thread: Image sequence loader

  1. #1
    Join Date
    Sep 2012

    Image sequence loader

    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.

    $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>";
    		echo "<img src='{$thumb}' alt='{$thumb}' />";

  2. #2
    Join Date
    Mar 2009
    post in PHP section

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center