edgar_lv Posted July 29, 2010 Posted July 29, 2010 Geat job done for this Add-on Jack! But there is a problem with special characters conversation for categories. I made a row for special symbols like: ā=>a,š=>s,ī=>i,ķ=>k,ģ=>g,ū=>u,ņ=>n,ļ=>l,ē=>e,ž=>z,č=>c,Ķ=>k,Ņ=>n,Ā=>a,Ē=>e,Ū=>u,Ī=>i,Š=>s,Ģ=>g,Ļ=>l,Ž=>z,Č=>c,é=>e,А=>A,Б=>B,В=>V,Г=>G,Д=>D,Е=>E,Ё=>E,Ж=>ZH,З=>Z,И=>I,Й=>I,К=>K,Л=>L,М=>M,Н=>N,О=>O,П=>P,Р=>R,С=>S,Т=>T,У=>U,Ф=>F,Х=>KH,Ц=>TS,Ч=>CH,Ш=>SH,Щ=>SHCH,Ы=>Y,Э=>E,Ю=>YU,Я=>YA,а=>a,б=>b etc. It works fine for products, but removes all non-alphanumeric characters (option in admin set to false) in category names:( I tryed to find a solution and it seems this makes a function: * Function to check if the url is valid * @author Jack York * @version 1.1 */ function VerifyLink(&$pStop, $pStart) { $r1 = $this->base_url.$this->uri_parsed['path']; $p1 = strpos($_SERVER['REQUEST_URI'], $this->attributes['SEO_REDIRECT']['URI_PARSED']['path']); $r2 = substr($_SERVER['REQUEST_URI'], 0, $p1); if (strpos($r1, $r2) === FALSE) { return true; } /*** begin check for characters at end of string before .html ***/ $endStr = substr($this->uri_parsed['path'], $pStart + 3, $pStop - $pStart - 3); if (! preg_match("/^([0-9_]+)/", $endStr)) { $parts = explode("_",$endStr); for ($p = 0; $p < count($parts); ++$p) { $parts[$p] = (int)$parts[$p]; } $newStr = implode("_", $parts); $this->uri_parsed['path'] = str_replace($endStr, $newStr, $this->uri_parsed['path']); $pStop = strpos($this->uri_parsed['path'], ".html"); //recalculate the end return true; } return false; } It seems that the urls are checked before conversion of special symbols. Is there a solution? My site: <a href="http://www.pulkstenis.lv/">www.pulkstenis.lv</a> Thanks in advance Edgars Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.