Please view my current gallery: http://www.markp.com/photos
I don't want to change the design, or feel I just want to make it simpler for me to upload images.
My directory structure is: Photos/PhotoSetName/TN
Photos is the main photo directory
PhotoSetName is the different photos i.e. newcastle03sept02
TN is the thumbnails directory for the above directory
Basically I want to drop a php file in the TN directory that reads all the files in that directory. Then links to the main file in the directory above when you click on the thumbnail.
I don't know where to start. Can anyone help?
Creating A Simple Image Gallery... Can You Help?
Page 1 of 14 Replies - 1449 Views - Last Post: 08 September 2002 - 09:13 PM
#1
Creating A Simple Image Gallery... Can You Help?
Posted 05 September 2002 - 03:09 PM
Replies To: Creating A Simple Image Gallery... Can You Help?
#2
Re: Creating A Simple Image Gallery... Can You Help?
Posted 05 September 2002 - 10:00 PM
i know gneato already has something very similar worked out, hopefully he'll see this in the next 24 hours, if not, i'll pm him.
#3
Re: Creating A Simple Image Gallery... Can You Help?
Posted 06 September 2002 - 09:26 AM
supersloth, on Sep 5 2002, 11:00 PM, said:
i know gneato already has something very similar worked out, hopefully he'll see this in the next 24 hours, if not, i'll pm him. 
pm him! pm him! pm him! pm him! pm him! pm him!
pm him! pm him! pm him! pm him! pm him! pm him!
pm him! pm him! pm him! pm him! pm him! pm him!
pm him! pm him! pm him! pm him! pm him! pm him!
pm him! pm him! pm him! pm him! pm him! pm him!
pm him! pm him! pm him! pm him! pm him! pm him!
pm him! pm him! pm him! pm him! pm him! pm him!
#4
Re: Creating A Simple Image Gallery... Can You Help?
Posted 06 September 2002 - 09:47 AM
Ok I've been given this code:
but this has two problems, it adds images one on top of each other, which should be fixed by removing the <BR> and if I remove the string replace _tm thing that should work I think! Then all I need to do is add the frame target.
Hurray! No doubt I'll be back when I have problems!
M
<?php
echo "testing stuff<hr>";
$dir = "/Users/nucleuz/Sites/flashkit.com/dir/tm";
$handle = opendir($dir);
echo "directory=$dir<br>";
while (($file = readdir($handle))) {
if(preg_match("/\.jpg$/", $file)) {
$link = $file;
$file = str_replace("_tm", "", $file);
echo "<a href=\"../" . $file . "\">" . $link . "<br>\n";
}
}
?>
but this has two problems, it adds images one on top of each other, which should be fixed by removing the <BR> and if I remove the string replace _tm thing that should work I think! Then all I need to do is add the frame target.
Hurray! No doubt I'll be back when I have problems!
M
#5
Re: Creating A Simple Image Gallery... Can You Help?
Posted 08 September 2002 - 09:13 PM
I have a script that creates the thumbnails on the fly. Currently designed for this directory structure...
/gallery/root/dir/
/gallery/root/dir/gallery_one/imagename.jpg
/gallery/root/dir/thumbs/THUMB_gallery_one_imagename.jpg
You call the script like this...
http://url.to.galler...ery=gallery_one
It shows a list of the images
To see a thumb, you visit
http://url.to.galler...l=imagename.jpg
If the thumbnail file doesn't exist, the script creates it... if the thumbnail image has already been created, it uses the existing one... (e.g. the thumbs are cached)
for fullsize, it's
http://url.to.galler...e=imagename.jpg
Tell me if you want the source code. Send me a pm or something. I'll have to adapt the code.
/gallery/root/dir/
/gallery/root/dir/gallery_one/imagename.jpg
/gallery/root/dir/thumbs/THUMB_gallery_one_imagename.jpg
You call the script like this...
http://url.to.galler...ery=gallery_one
It shows a list of the images
To see a thumb, you visit
http://url.to.galler...l=imagename.jpg
If the thumbnail file doesn't exist, the script creates it... if the thumbnail image has already been created, it uses the existing one... (e.g. the thumbs are cached)
for fullsize, it's
http://url.to.galler...e=imagename.jpg
Tell me if you want the source code. Send me a pm or something. I'll have to adapt the code.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|