[TYPO3-dev] tslib_fe-contentStr-hook

Steffen Kamper info at sk-typo3.de
Sat Oct 18 01:00:30 CEST 2008


Hi,

Dmitry Dulepov schrieb:
> Hi!
> 
> Steffen Kamper wrote:
>> the problem is that in the hook i only have the array where i can add 
>> a search and a replace string like
>> $params['search'][] = 'typo3';
>> $params['replace'][] = 'TYPO3';
>>
>> The replace is in tslib_fe after the hook and makes a simple 
>> str_replace with both arrays. But for the example above this doesn't 
>> work.
> 
> I would make a patch and add 'regexp' boolean key into $params. Then I 
> would use either str_replace or preg_replace in tsfe.
> 

i have an idea for a more simple solution: pass the content to the hook 
as second param, then in the hook everything could be done with it, 
small change but all freedom for content manipulation.

vg Steffen




More information about the TYPO3-dev mailing list