You are here:  » Search and Replace


Search and Replace

Submitted by mikecdprice on Fri, 2011-02-11 21:23 in

Hello,

Is it possible to when creating search and replace filters that I can create a filter to apply to all fields as a character error be corrected everwhere there is normal test and to be honest would not be in a url anyway ;)

How would I select ALL instead of a single area

Thank you

Submitted by support on Sat, 2011-02-12 09:55

Hello Mike,

As filters are applied on a field-by-field basis, it would probably be better to make your global search and replace at the top of the import record handler function in includes/admin.php. To do this, look for the following code around line 132:

    global $filter_record;

...and REPLACE that with:

    global $filter_record;
    foreach($record as $k => $v)
    {
      $record[$k] = str_replace("SEARCH","REPLACE",$record[$k]);
    }

...entering your search and replace strings where indicated - and that will perform the operation on ALL fields before anything else takes place...

Cheers,
David.
--
PriceTapestry.com