I have images with IPTC fields and I want them to be imported as coppermine fields. For example:
IPTC keywords: import to coppermine keywords
IPTC object name: import to coppermine image title
IPTC caption: import to coppermine image description
I tried it but it did not import anything.
http://www.translatum.gr/gallery/index.php
I tried again with enabled IPTC and it imported them but did not import the Greek letters:
i.e. IPTC keywords in pic were:
Βάρκες - Boats, Αφαιρετική - Abstract, Θάλασσα - Sea
And it imported
- Abstract, Θάλασσα - Sea
Known issue: IPTC doesn't support uft-8
Does this mean that if my coppermine encoding was Windows-1253 for example, Greek would be displayed correctly?
I also have a txt export of the images with the metadata in ASCII format. Would this help in importing them?
Maybe you can modify CPG to read 'your' IPTC-tags... I've done something similar (?) for german umlauts (üäö etc.).
Take picmgmt.inc.php, search for function add_picture.
search for:
if (is_array($iptc) && !$title && !$caption && !$keywords) { //if any of those 3 are filled out we don't want to override them, they may be blank on purpose.
$title = (isset($iptc['Title'])) ? $iptc['Title'] : $title;
$caption = (isset($iptc['Caption'])) ? $iptc['Caption'] : $caption;
$keywords = (isset($iptc['Keywords'])) ? implode(' ',$iptc['Keywords']) : $keywords;
add after:
$title = utf8_encode(html_entity_decode($title, ENT_NOQUOTES));
$caption = utf8_encode(html_entity_decode($caption, ENT_NOQUOTES));
$keywords = utf8_encode(html_entity_decode($keywords, ENT_NOQUOTES));
It works...
a) ... if your IPTC-'special characters' are encoded as html-entities. I don't know if that's the case with your pics. If it won't work, you maybe just have to change/replace the php-functions (like html_entity_decode) accordingly to en/decode them correctly. For me (german umlauts) it works with IPTC-Data written by www.xnview.com.
b) ... only with newly added pics. To reload the IPTC-Data of existing pics to the CPG database I've done another quick&dirty hack (http://forum.coppermine-gallery.net/index.php?topic=43486.msg234753#msg234753) that 'enhances' the "Reload file dimensions and size information"-admin tool to reload the IPTC-Data as well.
Maybe it's helpful, maybe it's not ;)
Hi lamama,
Thanks for your kind help! I tried it, but still skips the Greek. The program originally used for photo management was fotostation pro.
http://www.fotoware.com/Products/FotoStationPro/FeatureOverview.aspx
You can see one of the pics I used here
http://www.translatum.gr/gallery/displayimage-lastup-0-0.html
You're using cpg1.4.5, while the most recent stable release currently is cpg1.4.14, so you're running 9 (!!) versions behind. It is absolutely mandatory to upgrade asap no matter what!