Pedro Posada | PHP photo gallery

PHP photo gallery

Posted on March 6, 2008 - 10:07pm
<< 52 of 54 >>

This is a quick and dirty php script that generates a web picture gallery.

There is no need for a database because it recursively scans the directory tree and outputs all the images inside a n html table. It generates a navigation menu to switch between galleries as well.

It's a good solution if you deal with big amounts of pictures because you can just use FTP to upload the pictures and the script generates the thumbnails and galleries automatically.
directory structure php-gallery
You could also insert the script in your page through an include php tag and customize the look of it by modifying the css style sheet.

The idea is that you add folders inside gallery/images to create more picture galleries. In this example I created a category called Arts and I placed the City and No-flash galleries inside of it.

This gallery is just a coding exercise to get a whole picture gallery work from one php script and no use of databses. The advantages of this solution are the speed and the simplicity of it. Although the code is not very clean, the gallery work pretty well.

There is a lot of room for improvement, this is just the ferst version of a little project.

The picture on the right is a sample of how the directory structure should look like when you install the PHP gallery:

 

You are more than welcome to try it, you can download it from the link on the bottom of the page.

 

Installation:

  1. Download the compressed package
  2. Extract it on your public_html folder
  3. Make the yoursite.com/sample-gallery/cache/images direcotry writable, set its permissions to 777
  4. Upload your pictures to yoursite.com/sample-gallery/images/your-category/your-gallery
  5. Never change the names of the folders written here in bold.

System requirements:

  1. PHP 4.x or newer

 

 

AttachmentSize
sample-gallery.rar416.3 KB
Submitted by Billy Dawson (not verified) on March 30, 2011 - 7:41pm.

I’ve been through this article and find it very interesting. For more on tap dancing browse article at www.mgupload.net.

Billy Dawson
www.mgupload.net

Submitted by Mega Search (not verified) on April 11, 2011 - 5:51pm.

Are wondering why the boat can float but the stones cannot.If you want to know why search in the http://www.seapyramid.net for you to be answered.

http://www.seapyramid.net
Yvette

Submitted by Books and Manuals (not verified) on May 13, 2011 - 10:30pm.

I'm impressed. You're truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. I'm saving this for future use.

Vivian
Marks Web
imarksweb.net

Submitted by Readers Guide (not verified) on July 15, 2011 - 6:53pm.

Just wanted to give you a shout from the valley of the sun, that you have a great piece of details, these instructions are very clear and helpful. Thanks for sharing this awesome label. Can’t wait to see what else you have.

Joseph
Readers Guide
www.vssm.org

Submitted by Mega Search (not verified) on August 21, 2011 - 7:46pm.

I really appreciate your comments. You're so intelligent and very creative in posting comments. Keep it up searching new things in life.Learning is fun, you gain more knowledge as what others did.have a great day!.

Kim
www.seapyramid.net
Mega Search

Submitted by kiddzy (not verified) on October 13, 2011 - 3:43am.

This is a great article thanks for sharing this informative information. I will visit your blog regularly for some latest post.
Exhibit Rentals Press Release

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.