gallery where to i start

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sublevel4
Forum Commoner
Posts: 33
Joined: Wed May 29, 2002 2:14 pm
Contact:

gallery where to i start

Post by sublevel4 »

Ok. I have an idea that probably excedes my abilities and i don't know where to start.
I want to have a page that a user can upload an image and it would be placed in a folder with that users name on it. I would then like to have a gallery that the first page has a list of users who have up loaded images. then if you click on the name you would see a gallery of the images that person has posted.
I don't have enought experience to know what would be the best way to go about doing this.
Thank you for any imput :)
User avatar
gijs
Forum Commoner
Posts: 53
Joined: Wed Aug 28, 2002 4:05 am
Location: Belgium

You might wanna check these url's

Post by gijs »

Hi,

If it exceeds your ability, there are plenty of images gallerys available under GNU-license, which you could use as they are or adapt conform your needs

Check f.e. these url's
http://freshmeat.net
http://www.hotscripts.com/
http://php.resourceindex.com/

Also a good article on storage of binary data, which could be start for programming it your self can be found here http://www.php4.com/forums/viewtopic.php?t=6

Hope this is of any use to you :wink:

Gijs
sublevel4
Forum Commoner
Posts: 33
Joined: Wed May 29, 2002 2:14 pm
Contact:

Post by sublevel4 »

Thanks for the info. I think i am going to stick it out and try and build something. It is sure to be a learning experience!! :)
DeGauss
Forum Contributor
Posts: 105
Joined: Tue Oct 22, 2002 9:44 am
Location: Gainesville, FL

Post by DeGauss »

If you're planning to do it by learning (and kudos to you if you do) then the following information will help you onto the rigth track...

On php.net search for $HTTP_POST_FILES for information on how to transfer files without the use of FTP.

The gallery script itself would be fairly simple... Once again i give out the suggestion to draw it out on paper what you plan to do.

For example, do you want a single full-sized image per-page? Or do you want several thumbnails that can be full-sized by clicking on them?

You'll want to investigate arrays... One of the first gallery scripts i made used a manual array that i had to add to every time i had a new picture, but i soon realised that the easier way would be to simply get a list of files with jpg/gif/png extension within a certain directory.

Look up the following on php.net

directory functions (to look in a directory, which leads to...)
substr (to find the extension of a file in the directory you looked in, and then)
array functions (focusing on simple one-dimensional arrays to put the files that matched your mask into an array)

After that you can use things like imagesize (if that's the function name, can't remember clearly off the top of my head) and so on and so forth.

Enjoy.
Post Reply