IPTC support IPTC support
 

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 support

Started by ccphoto, May 25, 2008, 05:17:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ccphoto

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

ccphoto

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