Page 1 of 1
gallery where to i start
Posted: Mon Oct 21, 2002 2:38 pm
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

You might wanna check these url's
Posted: Tue Oct 22, 2002 11:39 pm
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
Gijs
Posted: Wed Oct 23, 2002 1:22 pm
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!!

Posted: Wed Oct 23, 2002 2:13 pm
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.