Customizing display of EXIF/IPTC

The EXIF and IPTC are automatically displayed in a nice and customizable way under each picture that contain such metadata if use_exif and/or use_iptc are enabled. See attached Screenshot at the end of this part.

To customize the EXIF/IPTC fields, the recommended way is to create a custom language file (as indicated when creating a new theme) and modify the following variables:

The original variables are located inside the default language file base/lang/ but as recommended for any modification that affect language files, please DO NOT edit directly, instead follow the instructions given in the last step of Creating a theme.

$txt_exif_custom and $txt_iptc_custom act in the same way, they're both special variables that can contain keywords (See EXIF/IPTC keywords reference table) which will be automatically replaced by metadata. A keyword must be encapsulated between % like this %Exif.Make% or this %Iptc.City%.

Here is a example showing how to use $txt_exif_custom

$txt_exif_custom="%Exif.Make% %Exif.Model%<br>%Exif.ExposureTime%s";

This will be displayed as follow:

"Canon D30<br> 1/60s" in the case of the picture was taken with a Canon D30 at the Speed of 1/60

For a complete list of available Keywords please see EXIF/IPTC keywords reference table

$txt_exif_missing_value and $txt_iptc_missing_value act in the same way, if a requested keyword is not found inside the picture metadata, the keyword will be replaced with the value of this field.

For example with $txt_exif_missing_value="??" and the same $txt_exif_custom as in the previous example.

If the picture doesn't contain the %Exif.ExposureTime% field, it will be display as follow:

"Canon D30<br> ??s"

Note that phpGraphy try to be intelligent and if the picture doesn't contain any metadata, it won't display anything. This will avoid to get a EXIF/IPTC field full of "??" or whatever you've set.

To display the 35mm equivalent for camera that doesn't embed this information to the EXIF metadata, phpGraphy rely on a external sensors database (stored as base/data/sensors.dat). There is also an online tool that enable you to play live with the 35mm Equivalent by choosing your camera type and entering the focal lenght, see it in action 35mm Equivalent Focal Lenght Calculator.

Figure 5.1. Screenshot when displaying EXIF/IPTC

On this screenshot, the "show me more" link has been activated, the nice display is just above the pink table

Screenshot when displaying EXIF/IPTC