ded Posted March 4, 2008 Share Posted March 4, 2008 Is it difficult to create a photo gallery using php? I want to allow a site admin to create folders and load/edit/delete images to each folder with a description. Is this possible with php and sql or should I just use a free gallery from somewhere? Thanks, DED Link to comment https://forums.phpfreaks.com/topic/94204-photo-gallery/ Share on other sites More sharing options...
pocobueno1388 Posted March 4, 2008 Share Posted March 4, 2008 Yes, it's possible using PHP and MySQL. The difficulty depends on your skill level, but it isn't a very complicated script. If you don't know how to program, I'm sure there is a free gallery script out there that will suit your needs, just Google it. Link to comment https://forums.phpfreaks.com/topic/94204-photo-gallery/#findComment-482513 Share on other sites More sharing options...
ded Posted March 4, 2008 Author Share Posted March 4, 2008 Thank you.....I would call myself a moderate php programmer. Still learning as I move forward. I will search for some code ideas to create the gallery. Thanks again, DED Link to comment https://forums.phpfreaks.com/topic/94204-photo-gallery/#findComment-482516 Share on other sites More sharing options...
jandrews3 Posted March 4, 2008 Share Posted March 4, 2008 I've created small galleries for members of one of my clients. Users have the ability to upload the desired photos which are stored in a special folder and automatically renamed using the member's user id plus an additional letter progressing from A to Z. This allows uploaded photos to be stored where ever I want and are easily referenced using the member's id plus the identifying character. Since the naming begins with the letter A, I can do a file_exist check to determine exactly how many photos the member currently has posted. I use this information to help set up the display outlay. I hope this helps. Link to comment https://forums.phpfreaks.com/topic/94204-photo-gallery/#findComment-482517 Share on other sites More sharing options...
unsider Posted March 4, 2008 Share Posted March 4, 2008 Ya there are plenty of tutorials/scripts for this, just google it. It's actually a nice little add-on to any website. Question for anyone that deals with uploading photos.. Do you guys store the images in a database (longblob), or in a folder, for later accessibility? And which is better for both: space efficiency / loading time? Link to comment https://forums.phpfreaks.com/topic/94204-photo-gallery/#findComment-482527 Share on other sites More sharing options...
pocobueno1388 Posted March 4, 2008 Share Posted March 4, 2008 Do you guys store the images in a database (longblob), or in a folder, for later accessibility? Both. Store the path to the file in the database along with who posted it, the description, and any other things you need. This way you can very easily get what you need and have easy access to any information you want. Link to comment https://forums.phpfreaks.com/topic/94204-photo-gallery/#findComment-482529 Share on other sites More sharing options...
unsider Posted March 4, 2008 Share Posted March 4, 2008 Hmm, good one, never thought to do both. ??? Alright. Thanks, clears a few potiental decisions up in the future. Link to comment https://forums.phpfreaks.com/topic/94204-photo-gallery/#findComment-482532 Share on other sites More sharing options...
jandrews3 Posted March 4, 2008 Share Posted March 4, 2008 I don't store it at all. In the upload process I rename the file to fit an expected pattern based on the member's id. Then I can recall the photo anytime I desire automatically knowing the name of whichever photo I need for whichever member. Link to comment https://forums.phpfreaks.com/topic/94204-photo-gallery/#findComment-482533 Share on other sites More sharing options...
pocobueno1388 Posted March 4, 2008 Share Posted March 4, 2008 I don't store it at all. In the upload process I rename the file to fit an expected pattern based on the member's id. Then I can recall the photo anytime I desire automatically knowing the name of whichever photo I need for whichever member. Thats a pretty big hassle, it also makes it difficult to search very well...especially if you need multiple photos. If you have access to a database, why not use it? It makes life so much easier. Link to comment https://forums.phpfreaks.com/topic/94204-photo-gallery/#findComment-482538 Share on other sites More sharing options...
unsider Posted March 4, 2008 Share Posted March 4, 2008 I don't store it at all. In the upload process I rename the file to fit an expected pattern based on the member's id. Then I can recall the photo anytime I desire automatically knowing the name of whichever photo I need for whichever member. That's like poco said, WAY too much work. I like to simplify it, even if it means more storage. But hey, whatever works for you. Link to comment https://forums.phpfreaks.com/topic/94204-photo-gallery/#findComment-482540 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.