changing iptc data fields while uploadin changing iptc data fields while uploadin
 

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]

Main Menu

changing iptc data fields while uploadin

Started by gos1, April 04, 2007, 03:56:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gos1

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 ?

gos1

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


  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.._?