forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 upload => Topic started by: uk_tomcat_fan on January 20, 2012, 12:50:24 am
-
Originally posted in the dev boards:
Hi guys
Been suffering with an issue for a while now.
I use Adobe lightroom to control my image workflow, and until now I have manually been amending files to allow me to populate the "headline" field in the IPTC Data, this is then copied to a network path (since my service is in my house) and I batch add the files using non browsable batch mode.
Looking at the IPTC which lightroom populates as their title, they use "Document Title"
Headline populated - http://widowmaker.is-a-geek.com/displayimage.php?album=11&pid=1743#top_display_media
Pure from lightroom - http://widowmaker.is-a-geek.com/displayimage.php?album=10&pid=1599#top_display_media
Attached are 2 files one with the Headline field populated and one straight from lightroom
Here is my website: http://widowmaker.is-a-geek.com
Any ideas?
-
Please read that thread: http://forum.coppermine-gallery.net/index.php?index.php/topic,61380.0.html
-
Hi Andre,
Unfortunatel, I have looked at that thread, and attempted to implement that change, however in my version of the code (cpg1.5.18) line 67 is shown as:
} else {
@unlink($uploaded_pic);
$msg = sprintf($lang_db_input_php['err_fsize_too_large'], $CONFIG['max_upl_width_height'], $CONFIG['max_upl_width_height']);
return array('error' => $msg, 'halt_upload' => 1);
}
}
Also when I search for that code, I find it is on line 48:
$title = (isset($iptc['Headline'])) ? $iptc['Headline'] : $title;
$caption = (isset($iptc['Caption'])) ? $iptc['Caption'] : $caption;
$keywords = (isset($iptc['Keywords'])) ? implode($CONFIG['keyword_separator'], $iptc['Keywords']) : $keywords;
Having changed that line to "Title" as described, the issue is still apparent.
Any ideas?
-
Please attach an example photo with IPTC data from Adobe Lightroom and tell me the value of the "headline", so I can find the corresponding IPTC value.
-
Here you go.
Note the "Headline" in IPTC is populated manually.
The field which should be populated is from the Exif : Title "Fantasy of Flight 2012"
Martin
-
Attaching Screenshot of Title:
-
I just uploaded your picture to my test gallery and everything seems to work as expected. It automatically added the following meta data to the picture in Coppermine:
Title: Fantasy of Flight 2012
Description: January 2012 trip to Fantasy of Flight in Florida
Keywords: Fantasy of Flight 2012
Hardly surprising, as you said:
the "Headline" in IPTC is populated manually.
which is read by Coppermine. Maybe that was my fault, as I mixed up something.
Coppermine reads the following data from the file during upload:
Array
(
[Title] => Fantasy of Flight 2012
[Urgency] =>
[Category] =>
[SubCategories] =>
[Keywords] => Array
(
[0] => Fantasy of Flight 2012
)
[Instructions] =>
[CreationDate] => 20120105
[CreationTime] => 165800
[ProgramUsed] =>
[Author] => Martin Pring
[Position] =>
[City] =>
[State] =>
[Country] =>
[TransmissionReference] =>
[Headline] => Fantasy of Flight 2012
[Credit] =>
[Source] =>
[Copyright] => Copyright: All Images are Copyright of Martin Pring
[Caption] => January 2012 trip to Fantasy of Flight in Florida
[CaptionWriter] =>
)
I marked all occurrences of "Fantasy of Flight 2012" bold. As you don't want to manually amend your files, I assume changing
$title = (isset($iptc['Headline'])) ? $iptc['Headline'] : $title;
back to
$title = (isset($iptc['Title'])) ? $iptc['Title'] : $title;
in include/picmgmt.inc.php should fix your issue. Obviously that's the opposite of what we did here (http://forum.coppermine-gallery.net/index.php?index.php/topic,61380.0.html) and you have to apply that change after each update.
-
Hi Andre
I have just tested that change, and I am still unable to insert the title :S
Could you let me know how you got that array?
-
Attached "test image"
-
apologies that file is the wrong one
-
I will need to test it further but I think if i make the "Caption" the title, this resolves the issue, I believe adobe are using caption for title from Lightroom, will test it when home,
Andre, could you confirm how I get that array info?
Martin
-
Could you let me know how you got that array?
Open include/picmgmt.inc.php, find
$iptc = get_IPTC($image);
and below, add
print_r($iptc); die();
and use the single HTTP uploader.
Of course that change only affects files uploaded after the code change.
-
Thanks!
I have now fixed the issue by changing "Headline" back to "Title"
-
Please
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.