ZenphotoCMS Forum
Changing the datafields - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Changing the datafields (/thread-6817.html)



Changing the datafields - Anders Kramer - 2010-03-22

Hello

I am trying to change the data fields for the images and albums (you know, location, city, state etc.) to something custom instead. I would also like to remove some of the fields.

Is this possible?

Regards
Anders




Changing the datafields - kagutsuchi - 2010-03-22

This can be done on the admin back-end. On the image editing page, each image will have a link "show more fields" which will reveal these data fields for editing.




Changing the datafields - acrylian - 2010-03-22

What do you want to change there? You can use these fields for anything, location must not contain a "location". It is all a matter of how you label them when displaying them on your theme.

Or do you mean the display of the exif data? That is done via the function printImageMetadata(). You can of course assemble your own custom display of that using the fields directly.




Changing the datafields - Anders Kramer - 2010-03-22

I would like to change the names of the fields.

Instead of location it should be origins and so on. Could that be done?




Changing the datafields - kagutsuchi - 2010-03-22

Probably the best way to do this is to create a custom function for your theme. You can use getImageMetadata() to get the fields and then display them however you want. (You could probably use printImageMetadata() as a template for the custom function.)




Changing the datafields - Anders Kramer - 2010-03-22

Cant I just change the original fields?




Changing the datafields - kagutsuchi - 2010-03-22

You can change the original fields, but you can't change the name of the original fields. printImageMetadata() will print each field with the title corresponding to the metadata field. To have custom titles, you will have to have your own function using getImageMetadata().




Changing the datafields - Anders Kramer - 2010-03-25

Hm ok. I'm not really that good at php. How do I use the getImageMetadata()?




Changing the datafields - kagutsuchi - 2010-03-25

http://www.zenphoto.org/2009/03/theming-tutorial/#custom-functions

You should create a file as per that link (functions.php) in your theme's directory. In that file, you can place the contents of the printImageMetadata() function from zp-core/template-functions.php as a template. You will need to make the function name something different, which will also mean that your theme will need to call the new function name instead of printImageMetadata().

You may want to read the rest of the Theming Tutorial as linked above. The edits you need to make to the custom function are fairly basic. You will have to figure it out on your own.




Changing the datafields - Anders Kramer - 2010-03-25

Sorry, I didn't see that you postet above.

, so iI found out that the EXIF fields have the sufficient types that I want. Now how do I enter information in the fields? no matter which fields I choose for displaying (options > Images > EXIF display), it is still the same fields that show then i "show more fields" under the images. How do I edit the EXIF fields?




Changing the datafields - sbillard - 2010-03-25

Zenphoto does not support modification of EXIF/IPTC fields--Those are properties of the image itself. But you can use applications like Adobe Bridge or Picassa to modify these image properties.




Changing the datafields - Anders Kramer - 2010-03-26

oh ok... hmm... How do I get the gallery to display "Special Data" then?




Changing the datafields - acrylian - 2010-03-26

As said you can label each field on the theme like you want. Output the field you wish directly and write "Special data" before it. Of course that requires modifying the theme.

I suggest to read the theming tutorial and visit the user guide in general.




Changing the datafields - Anders Kramer - 2010-03-26

no, i mean, there is a field called special data. how do i get it to display the data entered in that field?




Changing the datafields - sbillard - 2010-03-26

There is no field called "special data". You have probably enabled one of the example plugins that has "aliesed" the custom_data field so that it shows as "special data" on the admin back-end.




Changing the datafields - Anders Kramer - 2010-03-26

ah, makes sense. How do I add it to the image template?