character replace hack no longer working. character replace hack no longer working.
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

character replace hack no longer working.

Started by jaus, October 13, 2008, 06:00:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jaus

I had this working, but have not used coppermine for several months.  I recently started working with coppermine again and now this mod doesn't work anymore.   

In include/picmgmt.inc.php I changed this:

        if ($CONFIG['read_iptc_data']) {
           $iptc = get_IPTC($image);
           if (is_array($iptc) && !$title && !$caption && !$keywords) {  //if any of those 3 are filled out we don't want to override them, they may be blank on purpose.
               $title = (isset($iptc['Title'])) ? $iptc['Title'] : $title;
               $caption = (isset($iptc['Caption'])) ? $iptc['Caption'] : $caption;
               $keywords = (isset($iptc['Keywords'])) ? implode(' ',$iptc['Keywords']) : $keywords;
           }
        }


TO THIS:

       if ($CONFIG['read_iptc_data']) {
           $iptc = get_IPTC($image);
           if (is_array($iptc) && !$title && !$caption && !$keywords) {  //if any of those 3 are filled out we don't want to override them, they may be blank on purpose.
               $title = (isset($iptc['Title'])) ? $iptc['Title'] : $title;
               $caption = (isset($iptc['Caption'])) ? $iptc['Caption'] : $caption;
               $keywords = (isset($iptc['Keywords'])) ? implode(' ',$iptc['Keywords']) : $keywords;
           $parens = array("(" , ")");
               $keywords = str_replace($parens , "" , $keywords);
          }
        }



It was doing what I wanted (removing parenthesis from imported keywords) but now it doesn't.  I don't see what the problem is.  The only change I have made is upgrading to 1.4.19 and that seems to have gone well otherwise.  All of my other mods are still working.

What could have changed to make this one no longer work?

Thanks,
Joe.