forum.coppermine-gallery.net
Dev Board => cpg1.4 Testing/Bugs => cpg1.4 Testing/Bugs: FIXED/CLOSED => Topic started by: Joachim Müller on November 29, 2007, 08:16:27 am
-
Originally posted in http://www.pragmamx.org/Forum-topic-23114.html in German, here's the rough translation:
small request. :-X
I have IPTC display enabled. Only the field "Copyright" is being populated.
However, empty fields are being displayed. I have to workaround this by applying the changes suggested below to dsiplayimage.php each time I have to update:
Original code:
starting at line 191:
if (isset($iptc) && is_array($iptc)) {
array_walk($iptc, 'sanitize_data');
if (isset($iptc['Title'])) $info[$lang_picinfo['iptcTitle']] = $iptc['Title'];
if (isset($iptc['Copyright'])) $info[$lang_picinfo['iptcCopyright']] = $iptc['Copyright'];
if (!empty($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = implode(' ',$iptc['Keywords']);
if (isset($iptc['Category'])) $info[$lang_picinfo['iptcCategory']] = $iptc['Category'];
if (!empty($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = implode(' ',$iptc['SubCategories']);
}
Better would be:
if (isset($iptc) && is_array($iptc)) {
array_walk($iptc, 'sanitize_data');
if (!empty($iptc['Title'])) $info[$lang_picinfo['iptcTitle']] = $iptc['Title'];
if (!empty($iptc['Copyright'])) $info[$lang_picinfo['iptcCopyright']] = $iptc['Copyright'];
if (!empty($iptc['Keywords'])) $info[$lang_picinfo['iptcKeywords']] = implode(' ',$iptc['Keywords']);
if (!empty($iptc['Category'])) $info[$lang_picinfo['iptcCategory']] = $iptc['Category'];
if (!empty($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = implode(' ',$iptc['SubCategories']);
}
Could you please add this to the next version?
(my gallery resides at http://www.hppphoto.de)
Cheers xidefix
-
Applied suggested improvements to SVN (both of cpg1.4.x as well as cpg1.5.x). Marking thread as "fixed".