Saturday 08 April 2006 5:03:24 am
Hi,
<b>The situation</b> I am playing with the extension system. I need to add a new <b>wash('textism')</b> so I thought to override the original lib/eztemplate/classes/eztemplatestringoperator.php with a new extension/washtextism/lib/eztemplate/classes/eztemplatestringoperator.php that has a patched version of the <b>switch</b> within function wash(...)
. Here is the patch (diff original new):
402a403,419
>
> case 'textism':
> {
> $patterns = array('/\_([^\_]+)\_/', '/\*([^\*]+)\*/', '/\^([^\^]+)\^/', '/\~([^\~]+)\~/');
> $replacements = array('<em>\1</em>', '<strong>\1</strong>', '<sup>\1</sup>', '<sub>\1</sub>');
> ksort($patterns);
> ksort($replacements);
> $operatorValue = preg_replace( $patterns,
> $replacements,
> htmlspecialchars( $operatorValue )
> );
> } break;
>
> case 'strip':
> {
> $operatorValue = striptags( $operatorValue );
> } break;
<b>The problem</b> The override of the .php file is no consideret, at all, by the system. I am sure it works by itself since I tried it in the original file for debug purposes, only. Suggestions?
|