Jump to content

Photo Gallery


ded

Recommended Posts

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

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

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

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

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

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

Archived

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

×
×
  • Create New...

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.