[TYPO3-project-seminars] How to use the hook "modifySingleView"
rootsystem
info at rootsystem.de
Sat Oct 20 16:48:38 CEST 2007
Hello,
i am trying to use the (only existing) hook, which is the one called
"modifySingleView". How am i supposed to declare it? I tried several things.
* I did put the following statement into my ext_localconf.php (without
linebreaks):
$GLOBALS['TYPO3_CONF_VARS']
['SC_OPTIONS']
['EXT:seminars/pi1/class.tx_seminars_pi1.php']
['modifySingleView'][]=
'EXT:rsysseminarsext/
class.tx_rsysseminarsext_modsingleview.php
:tx_rsysseminarsext_modsingleview';
* This should be the usual emthod for including a hook. But as far as i
understand the sourcecode in class.tx_seminars_pi1.php i need to
configure the seminars extension to acivate the hook - right?
* The code:
-----
function getHookObjects() {
$extensionConfiguration =& $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'];
$hooks =&
$extensionConfiguration['seminars/pi1/class.tx_seminars_pi1.php']['hooks'];
if (is_array($hooks)) {
foreach ($hooks as $classReference) {
$this->hookObjects[] = t3lib_div::getUserObj($classReference);
}
}
return;
}
-----
does nothing since the array $hooks is empty.
* So i did put another entry in my ext_localconf.php which is (without
linebreaks):
$GLOBALS['TYPO3_CONF_VARS']
['EXTCONF']
['seminars/pi1/class.tx_seminars_pi1.php']
['hooks'][]=
'class.tx_rsysseminarsext_modsingleview.php';
* This gives me an error:
Class 'class.tx_rsysseminarsext_modsingleview.php' was not prepended
with 'user_'
* I changed the classname to
class.user_rsysseminarsext_modsingleview.php - same error
* I chaneged the entry in $GLOBALS['TYPO3_CONF_VARS']
['EXTCONF'] to:
'typo3conf/ext/rsys_seminars_ext/class.tx_rsysseminarsext_modsingleview.php';
- same error
* I tried as well
'EXT:class.tx_rsysseminarsext_modsingleview.php';
- this gives me a "class not found" error.
So, can anyone tell me how to use this hook? It can't be that difficult,
but there is no documentation anywhere, search google gives no results.
Am i the only one trying to use this hook - or has noone else
difficulties with it?
Any help would be appreciated - project has to be ready soon.
Thanks in advance for any help!
More information about the TYPO3-project-seminars
mailing list