openfarmcc / OpenFarm

A free and open database for farming and gardening knowledge. You can grow anything!
https://OpenFarm.cc
MIT License
1.56k stars 240 forks source link

Add and Remove Cover Feature Image #723

Open simonv3 opened 8 years ago

simonv3 commented 8 years ago

The way that this works right now is that each guide has a list of pictures, and the "featured image" is just an integer pointing to the index in pictures that is the featured image choice there.

I figure that the featured image = cover image. Thoughts @roryaronson?

roryaronson commented 8 years ago

Yea that sounds right to me. Featured = cover

roryaronson commented 8 years ago

What happens if the member uploaded a photo to a life stage, marks it as the featured image, but then deletes it from the life stage but wants to keep it as the featured image? Would removing it from the life stage remove it from being the featured image too? Would the featured image integer now be pointing at the wrong image?

simonv3 commented 8 years ago

oh. hmm. stage pictures != guide pictures. one possible way of doing this is if the user adds a stage image to a stage, and then if they mark it as a featured image it gets copied to the guide pictures array?

roryaronson commented 8 years ago

ohhh interesting. I was under the impression that any picture uploaded to the guide, be it a guide photo, a stage photo, or an action photo was up for being selected as the featured one. That makes more sense to me.

Maybe it would be best to copy the featured image to its own location, no matter where that image was originally uploaded (to the guide, a stage, or an action)

The member may even want to upload a completely different image for the featured one that isn't used anywhere else on the guide.

simonv3 commented 8 years ago

yeah, that's probably the right way of doing it.