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

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

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