Jump to content

Simple 1 file php gallery


meissen

Recommended Posts

Just like the description says. I want to create a simple PHP file that I can just upload to each of my picture directories that I have on my website. I want it to scan the directory that the PHP file itself is in for JPG files, then display the images in a gallery-type table, heck even if it only lists the images in a one column table, just to display them.

The farthest into this that I've been able to figure out is using the scandir to find the jpg, but I can't even figure out how to get that to work. I'm an extreme newb to PHP.

I'm not sure how indepth this might be, and in my mind it seems like it'd be VERY simple, if not something that would already be out there just because of how easy and dynamic it would be.

Here's my pseudocode idea:

create an array named images
scan the directory for jpgs, putting the results into the images array
HTML table opening tag
PHP loop that creates three columns with three images downsized using HTML, with a link to the image underneath it. continue loop until array is complete. Nothing fancy with the HTML code, just a very basic 3 column table, displaying 3 images about 300 wide with the link underneath it.

In my mind it seems simple. Anyone willing to whip this file up for me, or maybe direct me to a script that already does this? I can't imagine it being a new idea, but my searches have come up empty. If someone could create this PHP file, I'd be happy to paypal $5 someone's way for creating it, it seems like it'd be something that would take all of 15 minutes to create the file, I just don't have the PHP knowledge to do it myself.
Link to comment
Share on other sites

[!--quoteo(post=373860:date=May 14 2006, 08:46 PM:name=litebearer)--][div class=\'quotetop\']QUOTE(litebearer @ May 14 2006, 08:46 PM) [snapback]373860[/snapback][/div][div class=\'quotemain\'][!--quotec--]
This might be what you want...

[a href=\"http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm\" target=\"_blank\"]http://www.dynamicdrive.com/dynamicindex4/php-photoalbum.htm[/a]

And its FREE

Lite...
[/quote]


THANK YOU! I knew there had to be something like this!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.