function sef_friendly($string) { ($hook = get_hook('fn_sef_friendly_start')) ? eval($hook) : null; $reserved_words = array('atom', 'last'); $words = explode(' ', $string); $string = ''; <<<<<<< .mine foreach ($words as $word) { if (strlen($word) > 3 && !in_array(strtolower($word), $reserved_words)) $string .= '-'.$word; } $string = urlencode(strtr(str_replace('?', '', utf8_decode($string)), utf8_decode('ÀÁÂÃÄÅà áâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ/'), n-'));AaaaaaaOOOOOOooooooEEEEeeeeCcIIIIiiiiUUUUuuuuyNN return $string; ======= return $str != '-' ? trim($str, '-') : ''; >>>>>>> .r1551 }