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

Title: Upload via Batch using Lightroom as Editor = no title
Post 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?
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: Αndré on January 20, 2012, 09:30:13 am
Please read that thread: http://forum.coppermine-gallery.net/index.php?index.php/topic,61380.0.html
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: uk_tomcat_fan on January 20, 2012, 09:47:35 am
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?
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: Αndré on January 20, 2012, 10:36:33 am
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.
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: uk_tomcat_fan on January 20, 2012, 02:41:44 pm
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
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: uk_tomcat_fan on January 20, 2012, 02:43:40 pm
Attaching Screenshot of Title:


Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: Αndré on January 20, 2012, 03:23:47 pm
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:
Quote
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:
Quote
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
Code: [Select]
$title = (isset($iptc['Headline'])) ? $iptc['Headline'] : $title;back to
Code: [Select]
$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.
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: uk_tomcat_fan on January 20, 2012, 06:21:36 pm
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?
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: uk_tomcat_fan on January 20, 2012, 06:24:52 pm
Attached "test image"
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: uk_tomcat_fan on January 20, 2012, 06:27:28 pm
apologies that file is the wrong one
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: uk_tomcat_fan on January 20, 2012, 06:38:00 pm
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
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: Αndré on January 20, 2012, 07:02:56 pm
Could you let me know how you got that array?
Open include/picmgmt.inc.php, find
Code: [Select]
$iptc = get_IPTC($image);and below, add
Code: [Select]
print_r($iptc); die();and use the single HTTP uploader.


Of course that change only affects files uploaded after the code change.
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: uk_tomcat_fan on January 20, 2012, 10:43:07 pm
Thanks!

I have now fixed the issue by changing "Headline" back to "Title"
Title: Re: Upload via Batch using Lightroom as Editor = no title
Post by: Αndré on January 21, 2012, 12:11:18 am
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.