Results 1 to 5 of 5

Thread: display non-english characters in spider url (SEO friendly url)

  1. #1
    Join Date
    Nov 2008
    Posts
    24

    Default display non-english characters in spider url (SEO friendly url)

    When I enabled the SEO friendly URLs in Dynamics, I realised that my non-english characters in titles are gone away.

    The dyna_fetch_spider_url (/includes/vba_dyna_functions.php) uses
    preg_replace("/[^a-z_0-9 -]/i", '' to eliminate the characters other than 0-9, a-z, "_" and "-"

    So "Özdemir Erdoğan" becomes "zdemir erdoan" which has nonsense for SEs.
    Hook Location: vba_dyna_functions_dyna_fetch_spider_url
    PHP Code:
    $preg_tr = array(array('/(ç)/ie','/(ğ)/ie','/(ı)/ie','/(ö)/ie','/(ş)/ie','/(ü)/ie','/(Ç)/ie','/(Ğ)/ie','/(İ)/ie','/(Ö)/ie','/(Ş)/ie','/(Ü)/ie'),
                         array(
    'c','g','i','o','s','u','C','G','I','O','S','U'),
    );
    $text preg_replace($preg_tr[0], $preg_tr[1],$text); 
    This code is executed before dyna's preg_replace and convert my Turkish characters to relevants. You can modify the preg_tr array to add your own language specific characters to be converted. Pay attention for the order of input and output characters.
    I'm open for suggestions to make it better.

    P.S. Dont forget to hit "Update Order" in "Manage Categories"
    Last edited by argon; 04-10-2009 at 06:30 AM. Reason: added P.S.

  2. #2
    Join Date
    Apr 2005
    Posts
    2

    Default

    hi,

    can you post the complete file, with your code in it?

  3. #3
    Join Date
    Nov 2008
    Posts
    24

    Default

    There is no file modification required. Its'a plug-in. Add the code as a new plug-in through admincp.

  4. #4
    Join Date
    Apr 2005
    Posts
    2

    Default

    Hi,

    thank you

    It works fine by us

  5. #5
    Join Date
    Nov 2008
    Posts
    24

    Default

    Glad to hear that.
    u r welcome.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Spider friendly URL
    By ozidoggy in forum Troubleshooting & Problems
    Replies: 3
    Last Post: 11-22-2008, 11:54 AM
  2. Problem with Enable Spider Friendly URL
    By shlomot in forum Troubleshooting & Problems
    Replies: 2
    Last Post: 06-02-2008, 10:48 PM
  3. Spider friendly urls not working
    By Joshva2 in forum Troubleshooting & Problems
    Replies: 9
    Last Post: 02-02-2008, 08:55 PM
  4. How to change the URL layout (Spider Friendly URLs)
    By 456789232 in forum "How Do I..." Questions
    Replies: 1
    Last Post: 10-18-2007, 12:27 PM
  5. Spider Friendly / SEO URL's Not Working?
    By Kaelon in forum Troubleshooting & Problems
    Replies: 7
    Last Post: 09-01-2007, 01:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •