In my version 1.7.6 I have in member.php:
$image_keywords = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));
$image_keywords = preg_replace("/[\n\r]/is", " ", $image_keywords);
$image_keywords = str_replace(","," ",$image_keywords);
$image_keywords = ereg_replace("( ){2,}", " ", $image_keywords);
I should have this thing to have mod:
$image_keywords = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));
$image_keywords = preg_replace("/[\n\r]/is", ",", $image_keywords);
$image_keywords_arr = explode(',', $image_keywords);
array_walk($image_keywords_arr, 'trim_value');
$image_keywords = implode(',', array_unique(array_filter($image_keywords_arr)));
Today I solve the problem:
I change code from 1.7.6:
$image_keywords = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords']));
$image_keywords = preg_replace("/[\n\r]/is", " ", $image_keywords);
$image_keywords = str_replace(","," ",$image_keywords);
$image_keywords = ereg_replace("( ){2,}", " ", $image_keywords);
to MOD code:
function image_keywords($image_keywords){
$image_keywords = preg_replace("/[\n\r]/is", ",", $image_keywords);
$image_keywords_arr = explode(',', $image_keywords);
array_walk($image_keywords_arr, 'trim_value');
$image_keywords = implode(',', array_unique(array_filter($image_keywords_arr)));
return $image_keywords;
}
$image_keywords0 = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords0']));
$image_keywords1 = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords1']));
$image_keywords2 = un_htmlspecialchars(trim($HTTP_POST_VARS['image_keywords2']));
$image_keywords0 = image_keywords($image_keywords0);
$image_keywords1 = image_keywords($image_keywords1);
$image_keywords2 = image_keywords($image_keywords2);
$image_keywords = $image_keywords0.",".$image_keywords1.",".$image_keywords2;
$image_keywords = image_keywords($image_keywords);
Now I have no errors and MOD is working. But I have little problems with keywords:
EU07,EU07-102,D29-143
It should be:
EU07 EU07-102 D29-143