PDA

View Full Version : Photo header conflict with Object Name field


devenh
9th of January 2008 (Wed), 22:43
For the first time I was using the Object Name IPTC field in my workflow, but when I upload the photos to EE I found that the ee_photo_header was set to the contents of the Object Name field instead of the filename as it usually does. Files that I uploaded with an empty Object Name field worked normally.

Is it possible to upload files that use the Object Name field but does not interfere with the ee_photo_header?

Deven

Overshot
10th of January 2008 (Thu), 18:33
As it says on the Upload to Database page.. 'Data from EXIF and IPTC overrides default data where applicable.' This means that if your photos have an Object Name it will be used for the ee_photo_header replacing the combination of default header plus formatted filename as selected on Default Photodata >> Header Conversion.

To avoid this behaviour, (and to avoid the default 'free textual info' being replaced by an existing IPTC Caption value) I set both these values to null in any photos I upload to EE.

I don't know any way to affect this behaviour without a slight coding hack. To prevent the IPTC Object Name overriding the file name I reckon you need to comment out two lines in admin/SCRIPT_add_to_database.php
Find the code at about line 45 matching that below and add the double forward slashes to comment out the first and third lines as shown.

// if ($imagedata_header_to_sql == "") {
$imagedata_header_to_sql = ee_addslashes(ee_get_default_header($exhibition,$f ilename_to_sql,"1"));
// }

This will use the filename as the basis for the ee_photo_header and ignore any existing Object Name. I have only tested this very briefly. Modify Pekka's excellent code at your own risk.

Chris