Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: IPTC-Tag photographer in coppermine?  (Read 7221 times)

0 Members and 1 Guest are viewing this topic.

mmeike

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
IPTC-Tag photographer in coppermine?
« on: March 26, 2012, 09:52:19 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: IPTC-Tag photographer in coppermine?
« Reply #1 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:
Code: [Select]
        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;
            }
        }


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.
Logged

mmeike

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Re: IPTC-Tag photographer in coppermine?
« Reply #2 on: March 27, 2012, 11:49:31 am »

During upload, Coppermine automatically fills the title, caption and keywords of an image, if there's appropriate IPTC data:
Code: [Select]
        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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: IPTC-Tag photographer in coppermine?
« Reply #3 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.

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.
Logged

mmeike

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Re: IPTC-Tag photographer in coppermine?
« Reply #4 on: March 27, 2012, 12:17:45 pm »

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...
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.