| Wednesday 20 April 2005 6:35:41 am 
                                                                 
> I edited basic.tr and also latin.tr, where I defined to> map space to "-". But it doesn't work.
 
You will have to do it in PHP code, if you look at the <i>executeCommandCode()</i> and <i>generateCommandCode()</i> I mentioned you will see that it performs a certain regexp replace on the resulting text.What you need to do is to copy the code (from if() to else) and make a new command, e.g. url_clean.
 You can try this code: 
else if ( $command['command'] == 'url_clean' )
{
    $text = strtolower( $text );
    $text = preg_replace( array( "#[^a-z0-9_ -]#",
                                 "/ /",
                                 "/--+/",
                                 "/^-|-$/" ),
                          array( " ",
                                 "-",
                                 "-",
                                 "" ),
                          $text );
    return true;
}
Also the <i>generateCommandCode()</i> must be implemented, it will generate this PHP code in a file for later execution. -- Amos
 
 Documentation: http://ez.no/ez_publish/documentation
 FAQ: http://ez.no/ez_publish/documentation/faq
 |