[TYPO3] implementing hooks

Παναγιώτης Κονταξής pkontaxi at gmail.com
Tue May 13 13:37:39 CEST 2008


In extension's manual I read:

First of all you have to create an extension and to put the following line
in the ext_localconf.php file:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['wfqbe']['preProcessQueryStructure'][]='EXT:your_ext_key/res/class.tx_wfqbe_preprocessquery.php:tx_wfqbe_preprocessquery';
(I put this line both in ext_localconf.php of wfqbe's and your_ext_key's)

Then you have to create the class.tx_wfqbe_preprocessquery.php class and the
tx_wfqbe_preprocessquery function as follows:
..............(code for copy-paste)
(I created the file in typo3conf/ext/your_ext_key/res/)

What's wrong?

In the end I read:

For a better explanation of how to use an hook, please read the only docs.

What 's the only docs? Where could I find them?
Sorry but I 'm a newbie in extension development. Any help would be
appreciated!

Thanks again!
Παναγιώτης

2008/5/13 Dmitry Dulepov [typo3] <dmitry at typo3.org>:

> Παναγιώτης Κονταξής wrote:
> > To implement an available hook I have to create a new extension.
> > In kickstarter wizard I added a record only in General Info section (not
> in
> > New Database Tables or Frontend plugins etc) and then I wrote and
> installed
> > the new extension.
> > Then I created the ext_localconf.php file manually (kickstarter didn't
> > create this file) in extension's folder and I added this line (as I read
> in
> > extension's manual)
>
> Kickstarter generates this file only if it has something to put to it.
>
> >
> $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['wfqbe']['preProcessQueryStructure'][]='EXT:hookextension/res/class.tx_wfqbe_preprocessquery.php:tx_wfqbe_preprocessquery';
> > Finally I created the class.tx_wfqbe_preprocessquery.php in
> > /typo3conf/ext/hookextension/res folder (with copy paste from wfqbe's
> > manual)
>
> Cannot tell exactly what the problem are but at least you use wrong names.
> tx_wfqbe_preprocessquery name can be used only inside wfqbe extension
> because it has "tx_wfqbe_" prefix. You should have your own name that
> includes your extension key. Also "res/" is usually used for html/image
> files, not for PHP files.
>
> You may want to check where have you put this file. Make sure that path is
> correct.
>
> --
> Dmitry Dulepov
> TYPO3 core team
> Web: http://typo3bloke.net/
> Skype: callto:liels_bugs
> "Nothing is impossible. There are only limits to our knowledge"
> _______________________________________________
>  TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>


More information about the TYPO3-english mailing list