Advanced search  

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

Pages: [1]   Go Down

Author Topic: character replace hack no longer working.  (Read 1611 times)

0 Members and 1 Guest are viewing this topic.

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
character replace hack no longer working.
« on: October 13, 2008, 06:00:32 pm »

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:

 
Code: [Select]
      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:

 
Code: [Select]
       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.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.