Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
slug Transliteration
#1
Hi

I have Zegnåt's slug Transliteration script - http://get-simple.info/extend/plugin/slu...ration/33/ and it works fine with GS 2.03.

But it does not work with GS 3.0. I am not a programmer but I think there should be very minor updates/changes done in this script. May be anybody familiar with PHP could tell me what should be fixed? Thank you Smile Smile Smile

The script:

Code:
<?php
    $tf = basename(__FILE__,'.php');
    register_plugin(
        $tf,
        '<code>slug</code> Transliteration',
        '2',
        'Martijn van der Ven',
        'http://zegnat.com/',
        'If you use a language with non ASCII characters <a href="http://en.wikipedia.org/wiki/Transliteration">transliteration</a> can be used by GetSimple to change your page titles into slugs.'
    );
    add_action('changedata-save','translit');
    function translit($t=false,$m=false) {
        global $i18n;
        if (is_array($a=$m)||is_array($a=@$i18n['TRANSLITERATION'])||is_array($a=@$i18n['TRANSLIT'])) {
            if (!$t&&isset($_POST['submitted'])) {
                global $url, $xml, $file;
                $t = ($u=$_POST['post-id'])?$u:($u=$_POST['post-title'])?$u:'temp';
                $url = clean_url(to7bit(str_replace(array_keys($a),array_values($a),$t)));
                unset($xml->url);
                $note = $xml->addChild('url');
                $note->addCData($url);
                $file = GSDATAPAGESPATH.$url.".xml";
                return true;
            }
            return str_replace(array_keys($a),array_values($a),$t);
        }
        else return false;
    }
?>
Reply


Messages In This Thread
slug Transliteration - by arthur_a_keen - 2011-04-22, 18:00:38
slug Transliteration - by polyfragmented - 2011-04-22, 21:10:08
slug Transliteration - by arthur_a_keen - 2011-04-23, 08:37:17
slug Transliteration - by oratoran - 2011-06-01, 16:17:19
slug Transliteration - by yojoe - 2011-06-01, 18:24:10
slug Transliteration - by oratoran - 2011-06-01, 19:33:52
slug Transliteration - by yojoe - 2011-06-01, 19:58:09
slug Transliteration - by oratoran - 2011-06-01, 23:52:53



Users browsing this thread: 1 Guest(s)