Database - Photo Gallery
I have searched EVERYWHERE for the past week and have had no luck.
Currently I have a photo gallery on my aquarium fish website (fishindex.com). It has well over 2,200+ photos and is still going strong. I have created a SHTML page for each of these files by hand. This has been quite time consuming and I know there has to be a better way. I was hoping I could create a MySQL/PHP database with the following features:
1. Create multiple categories/sub-categories for the photos
2. Under each category I want a list of links to all of the photos. On this list I want the names to be sorted by common name of the fish. Also, I DONT want thumb nails.
3. On each page with the photo I want it to have a URL or email address link. Because the authors have asked that I place a link under each photo. Also, I would like the common name and scientific name of the fish under each photo. If possible I would like a little area where I can make comments.
4. Customizable headers and footers for each page.
I know that I am really asking for a lot. I hope that there is a script already out there that could do this for me.
I don't know anything about sql or anything related to it.
If you can help me in ANY way I would be very happy. Even a link or just aim me in some direction to help me organize this photo gallery.
Regards,
Kevin
FishIndex.com
------------------
cds posted this at 21:00 — 7th May 2000.
They have: 359 posts
Joined: Mar 1999
Hi Kevin the fishman,
You might want to check this page. It has a collection of mostly free PHP scripts. Some are standalone and some work with a mySQL backend. Hope this helps in your search.
http://www.hotscripts.com/PHP/Scripts_and_Programs/Image_Manipulation/Image_Display/
Dan
Dan
Recycle Video Games Network
Stupidity killed the cat, curiosity was framed!
fishman posted this at 22:35 — 7th May 2000.
They have: 4 posts
Joined: May 2000
I looked at most of the scipts and they are not what I want.
But thanks anyway...
Does anyone else have a suggestion?
------------------
Anonymous posted this at 22:57 — 7th May 2000.
They have: 5,633 posts
Joined: Jan 1970
You could hirer someone to build you a custom script for starters. If you want something custom that’s the best way to go. I do this type of work fairly often and people are always amazed at how functional a custom application is.
Second you may want to look at http://www.cgi-resources.com/Programs_and_Scripts/Perl/ they have a lot of Perl scripts, including tons of photo album type programs.
Good luck,
------------------
Adam
AIS Internet Solutions
[email protected]
www.aisinternet.com
fishman posted this at 23:23 — 7th May 2000.
They have: 4 posts
Joined: May 2000
I have looked through all the images at cgi-resources.com. Most of them are thumbnail galleries. The ones that aren't thumbnail galleries don't suite my needs.
Also, I was hoping to us MySQL so there would be less strain on the server. Or would a CGI work just as well?
------------------
Anonymous posted this at 00:07 — 8th May 2000.
They have: 5,633 posts
Joined: Jan 1970
The best way would probably be building a management interface that allows you (or your visitors) to add pictures and text, the images would then be stores in a particular folder and the program would index them by category or what ever. You could implement them directly into mySQL but most hosts have a maximum on the database size (usually anywhere from 2 to 8MB).
------------------
Adam
AIS Internet Solutions
[email protected]
www.aisinternet.com
fishman posted this at 00:31 — 8th May 2000.
They have: 4 posts
Joined: May 2000
Adam, there is no limit to the sizes of my databases.
How would I create something like that?
------------------
Anonymous posted this at 01:32 — 8th May 2000.
They have: 5,633 posts
Joined: Jan 1970
I’d be happy to point you in the right direction, however there’s no way I can explain it all here. If you want to save the images inside the database you use BLOBs (binary large object). There are a few tutorials around that explain how to do this. You may also want to purchase a PHP/mySQL book. DevShed also has a good mySQL tutorial at http://www.devshed.com/Server_Side/MySQL/Intro/ In many ways it’s a lot easier just to locate the files in your servers WWW space.
------------------
Adam
AIS Internet Solutions
[email protected]
www.aisinternet.com
Ralph Slate posted this at 14:12 — 8th May 2000.
They have: 32 posts
Joined: Mar 2000
First off, you need to learn SQL. With 2200+ photos, this is not something you want to do with text files and scripts. You want to use a database (mySQL is a good candidate that most web companies use) and a scripting language to generate your pages dynamically (PHP or Perl work well).
You might want to start a database in Microsoft Access. The database could have two parts (tables). One would correspond to information about the species of fish, and one would correspond to information about the photograph.
The fish table would contain the species, etc. You could also put "category" information on this table, like "man-eating fish", "plant-eating fish", etc.
Having a separate photograph table would allow you to have multiple photos of each fish if you so choose.
You might also want a table to store your categories/sub categories. It would depend if you want to have more information specifically about these categories (as opposed information about the individual fish). It would also help performance (I'll explain this later).
I would advise against storing the images in the database. This makes them unwieldy, and some service providers (mine, for example) prohibit this because they don't have a way of restricting the space you use in the database (the database files are stored in a common directory). If you use a standard directory structure to store the files and store pointers in your database to the file (by pointer, I mean the name of the file + the subdirectory) then it's just as easy as storing them in the database, and it more flexible.
I would suggest your fish table to look something like this:
1) Species ID (a simple number simply identifying your fish type. Don't try and build any intelligence into this key -- it can come back to haunt you later).
2) Species name
3) Common name
4+) Any specific information about this fish, including categories/sub categories, species comments, etc.
Your photograph table would be something like this:
1) Species ID (pointing back to the fish table).
2) URL/Email for credits.
3) Pointer to where the photo is. If you do this properly, you can have identical directory structures on your PC vs your web site. Then simply synchronize the directories whenever you update your site. It will allow you to see the picture on your PC and also on your site.
The advantage of keeping your site on both the web and your PC is that if your ISP decides to pull the plug on you, or the site crashes, you don't lose everything. It's a real concern, not a far-fetched one.
Once you have the web database set up and populated, all you need to do is to write a few scripts that will generate your pages. For example, you could have one script generate a list of category links. Each link would point to a script that generated the list of fish in that category. Each link in that list would bring up the photo(s) of the fish along with any descriptive information about it, and the crediting URL's.
One other thing to consider; you might want to use the database structure to generate static HTML pages for each fish. There are two reasons for this:
1) Database queries can be somewhat resource-intensive. Depending on how much power your site has (if you're on a virtual host shared by other sites, it might be slow to get data from a database), it might be faster to serve up a static HTML page vs. a dynamic page.
2) Search engines don't index dynamic pages. So if someone goes to Yahoo and types in "Sea Bass", if you have a static page devoted to the Sea Bass, it may come up, but if you only have a dynamic page it won't.
You're really going to have to want to learn about new technology though; it seems like you've reached the human limit on maintaining your web site, and in order to get to the next level you need to learn some new stuff.
Ralph
------------------
http://www.hockeydb.com
http://www.hockeydb.com
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.