xmastree
September 9th, 2005, 10:52 AM
I'm trying to make a simple web gallery using this (http://www.blazonry.com/scripting/photos1_how.php) method. It looks simple, and to add more pictures I just need to upload them, along with the GIF thumbnails.
However, while it works for him, it doesn't seem to work for me. :neutral:
The thumbnails are shown, but when I click one I don't see the image.
Here (http://xmastree.34sp.com/test/gallery.php) is my attempt. There are six files there. c2-1.jpg c2-2.jpg, c2-3.jpg and their respective gifs. However, when I click a thumbnail, c2-1.gif, it tries to load c2-1.gif.jpg rather than c2-1.jpg.
I've modified the original script by changing the background, and removing the -01 from the filename (the original had high res images reduced and renamed file-01.jpg, mine doesn't).
the bit that's going wrong seems to be this part:
$jpglink = substr($file, 0, 8);
echo "<td><a href=\"$jpglink.jpg\"><img src=\"$file\" height=\"$size[1]\" width=\"$size[0]\" border=\"0\" hspace=\"10\" vspace=\"20\"></a>";
Presumably $jpglink comes from the gif, but it's including the extension in the link.
However, while it works for him, it doesn't seem to work for me. :neutral:
The thumbnails are shown, but when I click one I don't see the image.
Here (http://xmastree.34sp.com/test/gallery.php) is my attempt. There are six files there. c2-1.jpg c2-2.jpg, c2-3.jpg and their respective gifs. However, when I click a thumbnail, c2-1.gif, it tries to load c2-1.gif.jpg rather than c2-1.jpg.
I've modified the original script by changing the background, and removing the -01 from the filename (the original had high res images reduced and renamed file-01.jpg, mine doesn't).
the bit that's going wrong seems to be this part:
$jpglink = substr($file, 0, 8);
echo "<td><a href=\"$jpglink.jpg\"><img src=\"$file\" height=\"$size[1]\" width=\"$size[0]\" border=\"0\" hspace=\"10\" vspace=\"20\"></a>";
Presumably $jpglink comes from the gif, but it's including the extension in the link.