IPTC-Tag photographer in coppermine? IPTC-Tag photographer in coppermine?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

IPTC-Tag photographer in coppermine?

Started by mmeike, March 26, 2012, 09:52:19 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

mmeike

Hello,
is there any way to show the IPTC-tag photographer in the image details in a coppermine gallery? I managed to get the Copyright in the image details, but would like to also have the photographer. If it's not possible, I just need to tell my photographers that they should put that in the copyright tag, too.

Αndré

During upload, Coppermine automatically fills the title, caption and keywords of an image, if there's appropriate IPTC data:
        if ($CONFIG['read_iptc_data']) {
            // read IPTC data
            $iptc = get_IPTC($image);
            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['Headline'])) ? $iptc['Headline'] : $title;
                $caption = (isset($iptc['Caption'])) ? $iptc['Caption'] : $caption;
                $keywords = (isset($iptc['Keywords'])) ? implode($CONFIG['keyword_separator'], $iptc['Keywords']) : $keywords;
            }
        }



Quote from: mmeike on March 26, 2012, 09:52:19 PM
I managed to get the Copyright in the image details, but would like to also have the photographer.
Please post that solution, so we don't need to start from scratch.

mmeike

Quote from: Αndré on March 27, 2012, 10:10:22 AM
During upload, Coppermine automatically fills the title, caption and keywords of an image, if there's appropriate IPTC data:
        if ($CONFIG['read_iptc_data']) {
            // read IPTC data
            $iptc = get_IPTC($image);
            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['Headline'])) ? $iptc['Headline'] : $title;
                $caption = (isset($iptc['Caption'])) ? $iptc['Caption'] : $caption;
                $keywords = (isset($iptc['Keywords'])) ? implode($CONFIG['keyword_separator'], $iptc['Keywords']) : $keywords;
            }
        }


Please post that solution, so we don't need to start from scratch.

There was nothing special involved, I just filled out a lot of IPTC-Tags on a test image and looked which one showed on the image details section. The copyright-tag shows, but nothing else of that section.
Apart form ticking the "read IPTC-data" I did no configuration and no code changes.
I'm not much of a programmer (actually never wrote any code myself in my live), but if the code section you posted above is the only code dealing with IPTC-tags, I'm really wondering why it's working at all...

You can see that it works and how it shows here:
http://coppermine.orientierungslauf.de/displayimage.php?album=3&pid=37#top_display_media
if you use the account Presse/Presse
I can also mail you an image with more IPTC-tags filled, especially the one I'm looking for (photographer) if that's helping.

But no need to invest too much time in that, if you say there's no easy way to get it, my photographers just have to deal with putting their name in the Copyright-tag - not a real problem.

Also I'm not really sure if a tipp for possible code changes would help, cause that's not my server (I'm just the one responsible for the sub-project building a picture database for journalists who are writing over our quite unknown sport) and I'm not sure if the administrators would want to do changes for me - right now we're just running the out of the box coppermine that was provided by the web hoster already. Ressources are a bit thin in our webteam...

Meike

Αndré

Depending on where you want to display that information it's just a very small code change.

Quote from: mmeike on March 27, 2012, 11:49:31 AM
right now we're just running the out of the box coppermine that was provided by the web hoster already
Please read this. You should really consider to maintain the gallery yourself, as you're already running an outdated version.

mmeike

Quote from: Αndré on March 27, 2012, 11:54:07 AM
Depending on where you want to display that information it's just a very small code change.
Please read this. You should really consider to maintain the gallery yourself, as you're already running an outdated version.

Read the info and can see why that's a good reason to maintain it ourselves. Have to talk to the server administrators, but I guess they might agree. I'll come back to that thread whenever we updated if I find an administrator willing to do the code changes.

You can consider that solved for the moment. Thanks for all the help...