$prefGroups['metadata'] = array(
'column' => _("General Options"),
- 'label' => _("Tags and EXIF Options"),
- 'desc' => _("Change options dealing with tags and exif data."),
- 'members' => array('showexif', 'exif_tags')
+ 'label' => _("Tags and Metadata Options"),
+ 'desc' => _("Change options dealing with tags and image metadata."),
+ 'members' => array('showexif', 'exif_tags', 'exif_title')
);
$prefGroups['perms'] = array(
'locked' => false,
'shared' => false,
'type' => 'multienum',
- 'desc' => _("Which Metadata fields should we automatically add as image tags during upload?"),
+ 'desc' => _("Which metadata fields should we automatically add as image tags during upload?"),
'enum' => Horde_Image_Exif::getFields(array($GLOBALS['conf']['exif']['driver'],
!empty($GLOBALS['conf']['exif']['params']) ? $GLOBALS['conf']['exif']['params'] : array()),
true)
);
+
+$_prefs['exif_title'] = array(
+ 'value' => '',
+ 'locked' => false,
+ 'shared' => false,
+ 'type' => 'enum',
+ 'desc' => _("Should we automatically set the image title on upload if able? If so, choose the field to obtain the title from."),
+ 'enum' => array_merge(array('none' => _("None")),
+ Horde_Image_Exif::getFields(array($GLOBALS['conf']['exif']['driver'],
+ !empty($GLOBALS['conf']['exif']['params']) ? $GLOBALS['conf']['exif']['params'] : array()),
+ true))
+);
\ No newline at end of file
$needUpdate = true;
}
+ /* Overwrite any existing value for caption with exif data */
+ $exif_title = $GLOBALS['prefs']->getValue('exif_title');
+ if (!empty($exif_fields[$exif_title])) {
+ $this->caption = $exif_fields[$exif_title];
+ $needUpdate = true;
+ }
+
/* Attempt to autorotate based on Orientation field */
$this->_autoRotate();
'ObjectName' => array('description' => _("Image Title"), 'type' => 'text'),
'By-line' => array('description' => _("By"), 'type' => 'text'),
'CopyrightNotice' => array('description' => _("Copyright"), 'type' => 'text'),
+ 'Caption-Abstract' => array('description' => _("Caption"), 'type' => 'text'),
),
'XMP' => array(