[TYPO3] Condition with userFunc doesn't work at all
Dmitry Dulepov [typo3]
dmitry at typo3.org
Mon Sep 15 12:44:08 CEST 2008
Hi!
Bas v.d. Wiel wrote:
> Following the instructions in TSRef I created a PHP function in
> localconf.php like so:
>
> <?php
> ....all configuration stuff....
> function newVisitor() {
> return(true);
> }
> ?>
>
> And I'm calling it from TS with a condition block:
>
> [userFunc = newVisitor()]
> ..
> [end]
>
> The function never gets called though. Am I missing something here? Is
> the TSRef maybe not completely up to date anymore? If I put in a die();
> call, or t3lib_div::debug some variable, nothing happens either. This
> leads me to believe the function never gets called at all. Please help!
You forgot the prefix ;) Every user function must be prefixed with user_ and be in fileadmin/. Also you need to add the file into includeLibs.
--
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/debugging_symlinked_typo3_files_with_komodo_ide_on_mac/
More information about the TYPO3-english
mailing list