Jump to content

Archived

This topic is now archived and is closed to further replies.

meissen

Simple 1 file php gallery

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.

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

×

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.