Member
Member
affa   2008-03-23, 22:15
#1

I'm in the midst of setting up a ZenPhoto/Wordpress integrated site for a relative's art gallery. I'm trying to sort out the best way to store information about each piece of artwork.

I know that something like title should be stored in the image file's metadata.

But what about something like size and price? I see a field called 'custom data' in the Zenphoto admin screen for an image, but that's only one field. I see in the Changelog for 1.1.4 that there is an entry "Site defined custom data fields for images and albums" but no matter how I google this I can't find directions (might just be looking in the wrong place!).

Anyway, my question is - based on your experiences/knowledge, what is the best way to store all the various information I need to store? And if the answer is custom fields, can someone point me to an instructional page on them?

Title (metadata), Date Art Created (metadata?), Price (custom field?), Size, Medium, etc.

Thanks in advance! I love Zenphoto!

Member
Member
sbillard   2008-03-24, 03:49
#2

For any information that has EXIF/IPTC fields, these are the best place to store. Otherwise, use the database fields. Do check, though. not all IPTC fields are currently captured by zenphoto. Just the ones that correspond to zenphoto database fields. All these fields are accessable/alterable in the ADMIN EDIT pages, including the afore mentioned custom data fields.

Member
Member
affa   2008-03-24, 06:02
#3

Thanks sbillard. I see where it says "Custom data:" on the edit screen for an image. How do I make this into multiple labled fields? (ie, price & medium)

Basically, I can't find the Admin Edit page you speak of.

Member
Member
sbillard   2008-03-24, 20:11
#4

You would have to write PHP to parse the field. use getCustomData() to retrieve it.

There is also custom data for the album--look at the top of the edit page where the rest of the album info is.

Member
Member
affa   2008-03-24, 20:29
#5

Ah, ok. I thought it was more of a 'add 3 fields' type of solution and I was just blind. Parsing makes it a bit more complex but certainly not impossible.

Now someone needs to write a fancy plugin that manages custom fields, letting the user create and access different values without needing to code php!

That's a hint to all of you wonderful plug-in developers out there.

Thanks again for the wonderful Zenphoto!

Administrator
Administrator
acrylian   2008-03-24, 21:32
#6

You could divide your desired values by comma for example in that field and use explode to show them separate in your theme as "price", "size" and so on. This could be done as a custom theme function.

Member
Member
LpSoleil   2008-05-02, 20:53
#7

Well, I was looking for the same thing ( add 3 more data field for my Artwork ) and I don't quite understand the principle. Can you explain more please. Or tell me where to look in the code

The need is :
1- being able to add (or change) 3 fields when I insert an image - that are metadata i guess such as Location, City, State... but for title, medium, size, price...

2- Retrieve this information on frontEnd

That's about it.

Thank you for your wonderfull gallery.

Lp

Administrator
Administrator
acrylian   2008-05-03, 09:54
#8

For example add this "pricevalue/sizevalue/mediumvalue (...)"
To get the data of the image custom field in your theme use this:
http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functiongetImageCustomData

Then use this to separate the values: http://www.php.net/manual/en/function.explode.php.
There are some example below how to use it.

If you maybe are trying to use PayPal for selling picture, you might try the nightly build that has a PayPal plugin.

Member
Member
affa   2008-05-03, 10:16
#9

LpSoleil, I ultimately did not use custom fields - rather, I 'misused' all the EXIF/IPTC fields and found the end result MUCH easier... and the info now travels with the files! For example, I put medium (oil, watercolor) where city was supposed to go.

Member
Member
LpSoleil   2008-05-04, 02:18
#10

I will try to work it out with Acrylian solution, that will be simpler for other user to put information under the right fields. I am more an artist than a developper, but I do like to dig the code and make it works. The goal is set and the tool too, i just have to clarify and work it out! And for the PayPal plugin, that is a really good idea. Thank you Acrylian.

Thank you to Affa too for his/her answer.

Member
Member
LpSoleil   2008-05-04, 02:28
#11

By the way, affa, is there a way to take a look at your site with art ?

Administrator
Administrator
acrylian   2008-05-04, 10:31
#12

LpSoleil, if you don't use photos with EXIF data and so are not "in danger" of overwriting the info, then affa's solution might be worth a try. BTW, the night has an experiemtat shutterfly plugin too.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.