forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 PHPnuke/Postnuke Support => Topic started by: gtroll on December 06, 2003, 07:41:36 am

Title: IPTC Support
Post by: gtroll on December 06, 2003, 07:41:36 am
I dunno if this will work but will someone with a pic with IPTC test
Replace
Code: [Select]
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] with trailing slash in the configure
    // Create the add to fav link

with
Code: [Select]


    if ($CONFIG['read_iptc_data']) $iptc = get_IPTC($path_to_pic);
    if (isset($iptc) && is_array($iptc)) {
        if (isset($iptc['Title'])) $info[$lang_picinfo['iptcTitle']] = trim($iptc['Title']);
        if (isset($iptc['Copyright'])) $info[$lang_picinfo['iptcCopyright']] = trim($iptc['Copyright']);
        if (isset($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = trim(implode(" ",$iptc['Keywords']));
        if (isset($iptc['Category'])) $info[$lang_picinfo['iptcCategory']] = trim($iptc['Category']);
        if (isset($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = trim(implode(" ",$iptc['SubCategories']));
    }
    // with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] with trailing slash in the configure
    // Create the add to fav link
Title: IPTC Support
Post by: eolica on December 06, 2003, 11:43:55 am
It works fine!  (merged with changes in topic:
http://forum.coppermine-gallery.net/index.php?topic=2200 )

The only problem is with Title. My IPTC field is Headline, not Title (as per Irfanview IPTC support), so there is no IPTC Title field shown