Jump to content


Photo

Simple 1 file php gallery


  • Please log in to reply
2 replies to this topic

#1 meissen

meissen
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 15 May 2006 - 12:16 AM

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.

#2 litebearer

litebearer
  • Members
  • PipPipPip
  • Advanced Member
  • 2,357 posts
  • Locationwhite lake michigan

Posted 15 May 2006 - 12:46 AM

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...

all the brothers were valiant!

[br][br]The truely intelligent people are not those who create the dots; rather they are they ones with the ability to connect the dots into a coherent picture

#3 meissen

meissen
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 15 May 2006 - 12:48 AM

[!--quoteo(post=373860:date=May 14 2006, 08:46 PM:name=litebearer)--][div class=\'quotetop\']QUOTE(litebearer @ May 14 2006, 08:46 PM) View Post[/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!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users