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: changing iptc data fields while uploadin  (Read 2239 times)

0 Members and 1 Guest are viewing this topic.

gos1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
changing iptc data fields while uploadin
« on: April 04, 2007, 03:56:16 pm »

hi
I want my coppermine to use headline field instead of keywords while displaying in the site. 
 Which file should I modify? I mean which file inserts the image data in the database ?
Logged

gos1

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: changing iptc data fields while uploadin
« Reply #1 on: April 05, 2007, 02:34:49 am »

i am now modifying the displayimage.php file and find the iptc data part.

 
Code: [Select]
  if ($CONFIG['read_iptc_data']) $iptc = get_IPTC($path_to_pic); //echo "IPTC on";



    if (isset($iptc) && is_array($iptc)) {

if(is_array($iptc['Keywords'])) { $ikw=implode(",", $iptc['Keywords']); } else { $ikw=$iptc['Keywords']; }

require_once("ConvertCharset.class.php");

$NewEncoding = new ConvertCharset;

        if (isset($iptc['Title'])) $info[$lang_picinfo['iptcTitle']] =  $NewEncoding->Convert(trim($iptc['Title']), "x-mac-roman", "utf-8", 0);

        if (isset($iptc['Copyright'])) $info[$lang_picinfo['iptcCopyright']] = $NewEncoding->Convert(trim($iptc['Copyright']), "x-mac-roman", "utf-8", 0);

        if (isset($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = $NewEncoding->Convert(trim($ikw), "x-mac-roman", "utf-8", 0);

        if (isset($iptc['Category'])) $info[$lang_picinfo['iptcCategory']] = $NewEncoding->Convert(trim($iptc['Category']), "x-mac-roman", "utf-8", 0);

        if (isset($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = $NewEncoding->Convert(trim($iptc['SubCategories']), "x-mac-roman", "utf-8", 0);
       
        if (isset($iptc['Headline'])) $info[$lang_picinfo['iptcHeadline']] = $NewEncoding->Convert(trim($iptc['Headline']), "x-mac-roman", "utf-8", 0);

    }

 
 

 I dont know if it is right but added the Headline part myself. Now cannot understand the logic between the data fetched from iptc data and displaying it to the screen. How Can I manage that ? I want the Headline part to be echoed  in the screen as the file description. And Also I want the headline part to be inserted into the database instead of keyword. Is there a way to do that what should I change and Am I in the right place.._?
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.