Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm trying to create a simple photo gallery for a web site, but everything I have found is to complex for what I need. I've look at hotscripts.com and searched Google. I have a directory of images. I want a php script which will take that directory, generate thumbnails for all the images and display those thumbnails on a page. I also what to ultimately apply the "lightbox" effect seen here http://www.dynamicdrive.com/dynamicindex4/lightbox/index.htm to the links.
Like I said I've searched for a script that would do what I want, but they are all to complicated to embed in an existing html page. I need something short and sweet. Any suggestions?
-Ryan Adams
http://members.cox.net/rtadams89/

Creating thumbnails should be a one-time process. Using PHP to generate thumbnails every time a page is loaded is VERY inefficient and will cause that page to load very slowly.
If you are the one who will be uploading photos, you should create the thumbs beforehand. You can do it in mass using several free applications. I would suggest you download the ImageResize PowerToy from Microsoft. You can then resize the images and either rename them with a prefix or suffix (e.g. imagename_thumb.jpg) - that is what that lightbox site does, OR put them in a separate directory.
If you are going to allow users to upload images through the site, then you should have a script to create the thumb during the upload process. Here is a tutorial for that: http://www.plus2net.com/php_tutorial/php_thumbnail.php
Michael J

Ok, well I've finally got an image gallery up on my site. It's a PHP script, which is displayed in an iframe on my page. You can see what I am talking about here: http://rtadams89.dyndns.org:9555/baseball2/photos.html
You'll notice that when you click on a thumbnail it opens in a new window. I trying to replace this behavior with something like what is seen here: http://www.dynamicdrive.com/dynamicindex4/lightbox/index.htm
I'm running into two problems though. 1) I'm having extreme issues getting the lightbox code merged with the PHP image gallery code. and 2) I'm not sure how to make the lightbox effect appear over the whole page (the one with the iframe) and not just in the iframe.
I've put the intire gallery folder (the one with my images, the lightbox files, and the php scripts) in a zip file. If someone could please take a look at these and help me out it would be much appreciated. Thanks.
ZIP file: http://rtadams89.dyndns.org:9555/help.zip
-Ryan Adams
http://members.cox.net/rtadams89/

Well, the link to your page above results in a "Page Cannot be Displayed" error.
However, from your description, I think I might have a solution. Instead of using an I-Frame, just have the image gallery displayed on the page - use a div if the gallery is too large to fit. You will just need to modify the gallery files to display only the content after the opening BODY tag up to the closing BODY tag. Many PHP plug-ins will use a header.php and footer.php that you can simply replace with blank files.
Then the lightbox code shuld open the image centered on the main page. I had bad results using I-frames in the past - especially with AOL users. It may be better supoprted not, but I tend to stay away from it if I can.
Michael J

I would try using:
http://www.zenphoto.org/Real great super simple PHP script for photo galleries. No
iframe support as of yet (I don't think) but you might be able to tweak it to fit your needs.There is already an excellent Lightbox theme you can
download here:
http://www.zenphoto.org/support/topic.php?id=232No, I don't do anything with zen photo, I just like it a lot.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |