Jump to content

Archived

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

anticore

creating simple image gallery

Recommended Posts

i'm trying to create a simple gallery for my site.
and i'm not sure on how to go about it.
i'm designing my mysql table to look like

id,name,year,yearsection,description,image1,image2,image3,image4,thumbnail

yearsection is so that i can call all the images within year catagories i have already defined
and the imageX are to store the locations of the images.

i'm thinking i'm going to need a couple functions
a listing function to list according to my year catagories showing a thumbnail and just a name
a id function to load whatever image/name is chosen on the listing page with the describtion and images
and an add/delete/modify.

Is there something i'm forgetting? or is there a better way of doing this

Share this post


Link to post
Share on other sites
[!--quoteo(post=352937:date=Mar 8 2006, 07:09 PM:name=anticore)--][div class=\'quotetop\']QUOTE(anticore @ Mar 8 2006, 07:09 PM) [snapback]352937[/snapback][/div][div class=\'quotemain\'][!--quotec--]
i'm trying to create a simple gallery for my site.
and i'm not sure on how to go about it.
i'm designing my mysql table to look like

id,name,year,yearsection,description,image1,image2,image3,image4,thumbnail

yearsection is so that i can call all the images within year catagories i have already defined
and the imageX are to store the locations of the images.

i'm thinking i'm going to need a couple functions
a listing function to list according to my year catagories showing a thumbnail and just a name
a id function to load whatever image/name is chosen on the listing page with the describtion and images
and an add/delete/modify.

Is there something i'm forgetting? or is there a better way of doing this
[/quote]

Maybe it's the complicated part of me, but I would definately seperate this into at least a few tables and join them based on the data you need. What are the image1-4 for? wouldn't it just be 1 source image, grouped together by category, year, event? something along those lines?

I think you have a good general idea, but it needs to be expanded a little bit ;)

Share this post


Link to post
Share on other sites
image 1-4 are for inputing the locations of the images.
the listing part of this will only show the thumbnail followed by the owner/name
clicking on it will bring up a description followed by 4 pictures.

should i just upload the images to the table? would that be complicated?

Share this post


Link to post
Share on other sites
[!--quoteo(post=352984:date=Mar 8 2006, 09:02 PM:name=anticore)--][div class=\'quotetop\']QUOTE(anticore @ Mar 8 2006, 09:02 PM) [snapback]352984[/snapback][/div][div class=\'quotemain\'][!--quotec--]
image 1-4 are for inputing the locations of the images.
the listing part of this will only show the thumbnail followed by the owner/name
clicking on it will bring up a description followed by 4 pictures.

should i just upload the images to the table? would that be complicated?
[/quote]

So 1 thumbnail, 4 pictures?

You see the problem with this right? You'll never be able to expand nicely, if, say, you want 5 pictues, and it's actually LESS work to make it expansive.

Take this layout for example...

table thumbnails
table images

if you make thumbnails and images relational.. meaning they both have 1 field which can associate each other with one another.. then you can have multiple images per thumbnail. make sense?

Take this hypothetical query:
[code]select * from thumbnails tn
inner join images i on i.thumbnailid = tn.id
where tn.id = 2[/code]

I hope that makes a bit of sense, I can elaborate more if needed ;)

Share this post


Link to post
Share on other sites
I dont want to make a thumbnail for each image.
I am going to use the 'thumbnail' image for the listing page.

lets say someone chooses the 1993-1998 catagory
I want to have the list of the corresponding user 'rides' to come up
Showing

|ThumbnailImage| - User's Name (a link to show the cars details and images)
|ThumbnailImage| - User's Name (a link to show the cars details and images)
|ThumbnailImage| - User's Name (a link to show the cars details and images)
and so on.

Share this post


Link to post
Share on other sites

×

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.