[TYPO3-english] Custom wrapping text and textpic cObj
Andrew Plank
plankmeister_NO at SPAM_hotmail.com
Tue Nov 24 10:12:06 CET 2009
Tomas Mrozek wrote:
>> But this doesn't work; the function isn't called.
>
> I think it should be user_MyUserFunc.
>
>> I simply added the function to the end of typo3conf/localconf.php.
>
> The better probably is to place it into your own PHP file as:
>
> class user_myClass {
> myFunction($content, $conf) {
>
> }
> }
>
> ...include the file in your TS setup:
>
> page.includeLibs.mc = fileadmin/myCustomClass.php
>
> ...and then call:
>
> tt_content.text.30.userFunc = user_myClass->myFunction
>
> Tomas Mrozek
Hi Tomas,
I'd tried that already, however, I'd used a different classname. It
appears that the classname *must* be called user_MyClass, otherwise it
won't work. I did some tests, and if the class name was anything other
than user_myClass or user_MyClass, it wouldn't work. Most curious! But I
got it to work in the end :)
//Plankmeister
More information about the TYPO3-english
mailing list