Hi,
I'm using the UserComment field to store visibility info about my photo (is it public or password protected). I'm trying to get zenphoto to pick up the UserComment exif field from my photos, but I can't get it do do so.
I've added the field to the $_zp_exifvars array in the functiuns.php file:
`'EXIFUserComment' => array('SubIFD', 'UserComment', gettext('User Comment'), true, 128),`
The column gets created in the DB during setup but it is always empty, zenphoto can't read the field from the photos.
I've noticed that the UserComment part of exif.php is actually commented out (line 650):
`
//case "9286": //UserComment
// $encoding = rtrim(substr($data, 0, 8));
// $data = rtrim(substr($data, 8));
// break;
`
Is there any known issue about that?
Thanks,
Matt
Comments
I tried un-commenting the piece of code but no luck.
Fortunately I have the Exif:UserComment fieled duplicated in the IPTC:SpecialInstructions field, and I was able to get zenPhoto pick this one up. I added the following to the functions.php (Note that for some reason the Metadata Key is SpecialInstru):
`'IPTCSpecialInstructions' => array('IPTC', 'SpecialInstru', gettext('Special Instructions'), true, 256),`
Then I added a couple lines to the updateMetaData() function in class-image.php:
`
/* set show with info from IPTC special instructions */
$this->setShow($this->get('IPTCSpecialInstructions')=='visibility:public');
`
This will make any photo visible by default if the IPTC:SpecialInstructions field matches 'visibility:public' and will make any other non-visible.