Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
wcz_utf8_url - native unicode urls
Summary
wcz_utf8_url – uses UTF-8 permlinks instead of transliterated ones for SEO
Features
- automatically handles non ASCII characters
- integrated function for updating all of your existing titles – backup first!!!, use on your OWN risk —>
<txp:update_urls />
- works with German, Russian, Ukrainian (on live sites)
- tested with Japanese, Farsi, Arabic
Version history:
0.1.7 - fixed error with right-to-left languages
0.1.6 - Minor fix autodetect charset in mb_strlower
0.1.5 - Minor fix for mb_strlower and charset
0.1.4 - minor fix of preserving already existing dashes/minuses
0.1.3 - added remove small words
0.1.2 - minor fixes with double dashes and trimming the url string
0.1.1 - minor fixes
0.1.0 - initial release
Requirements
Tested with:
- Textpattern 4.4.1 – 4.5.7, MySQL 5.1.49, PHP 5.3.3 (Debian Squeeze)
Download & Installation
- Download wcz_utf_url and install it in the usual way.
- Adjust Textpattern->Advanced Options->“Maximum URL length (in characters)” to your needs.
Source
Git repository: https://github.com/wcz-txp/Unicode-url-for-Textpattern
Bugs & Limitations
Let me know if you find any problems.
To do
- make list of “small words” a parameter
Feedback
Comments are welcome.
Credits
Big thanks to Gocom, see this thread …
Last edited by whocarez (2016-01-18 09:29:59)
Offline
#2 2015-02-08 16:53:48
- raminrahimi
- Member
- From: India
- Registered: 2013-03-19
- Posts: 278
Re: wcz_utf8_url - native unicode urls
Hi, i tried that with Asian languages (Arabic, Persian,etc…) but It’s not working ! it become something ??????????????? on the URL , could u plz help me. tnx
Offline
Re: wcz_utf8_url - native unicode urls
I found a problem, that I can’t solve myself.
The register_callback isn’t used, when I edit an alread saved article.
register_callback('wcz_utf8_url','sanitize_for_url');
I played a little bit around with adding options like $step or $pre, but couldn’t find a solution. I tried it on a fresh installation but no success.
Do I have to register another callback?
The problem raminrahimi reported here, is linked to right-to-left languages. So the url transformations aren’t working.
Offline
Re: wcz_utf8_url - native unicode urls
Have you declared the right plugin type? I think you must declare it being of type 5 (“Admin + Public (+AJAX)”) to support the new AJAX calls when you modify an article.
Offline
Re: wcz_utf8_url - native unicode urls
Thanks a lot!! That helped. New version in first post, if someone is interested.
Offline