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 support  (Read 1970 times)

0 Members and 1 Guest are viewing this topic.

ccphoto

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
IPTC support
« on: May 25, 2008, 05:17:39 pm »

I have just updated to the latest version of Coppermine.

In the previous version I was using (I am not sure of the version number) I had the following modification

Locate the following line of code in include/picmgmt.inc.php
Code: 
$imagesize = getimagesize($image);
Replace it with the following:
Code:
   $imagesize = getimagesize($image,&$info);
   $iptc = iptcparse($info["APP13"]);
   if (is_array($iptc)) {
      $caption.=$iptc['2#120'][0];
      $title.=$iptc['2#005'][0];
      (is_array($iptc['2#025'])) && ($keywords.=implode(" ", $iptc['2#025']));
   }

When batch uploading this mod extracted the file name and placed it in the coppermine Title field
It took the IPTC caption/description and placed it in the coppermine description field.

I have tried the same mod with the new version but uploads fail.

Does anyone know what modification will create the same result with cpg1418
Logged

ccphoto

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: IPTC support
« Reply #1 on: May 26, 2008, 02:26:13 pm »

Ok, I have made progress on this.
Caption now fixed - a radio button in the config section.

I would still like to be able to have the Filename appear automatically in the CPG Title field.

I now know it is possible using the Admin tools to update filename - File title for a gallery but this is not ideal (another step in an already demanding workflow).
Besides I am sure it is possible as I had this feature through the aforementioned mod.

I have made progress.
The following addition to iptc.inc.php

  $IPTC_data=array(        "Title"                        =>    substr ($filename ,0,- 4),     //$iptc["2#005"][0],

(I added "substr ($filename ,0,- 4),     //")
almost does what I want but instead of just the filename it loads the entire path for the file
eg coppermine/albums/myfolder/abcde becomes the title

instead of just abcde

If someone who understands php could help me Id be very grateful.
Thanks
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.