[TYPO3] Extension "comments" notification without the need to approve each comment?
Dmitry Dulepov
dmitry at typo3.org
Wed Oct 1 21:17:19 CEST 2008
Hi!
Thomas Hirt wrote:
> Sorry, but every line of code seems to be an adventure.
>
> This line wont work:
> $this->templateCode = $this->cObj->fileResource($conf['templateFile']);
>
> This will work neither:
> $this->templateCode
> $this->cObj->fileResource("EXT:comments_email/res/email.txt");
>
> I always get the following error:
> Fatal error: Call to a member function fileResource() on a non-object in
> /home/.sites/649/site594/web/typo3conf/ext/comments_email/class.tx_commentsemail_hooks.php
> on line 22
>
> But I included the class class.tslib_pibase.php
> require_once(PATH_tslib . 'class.tslib_pibase.php');
>
> And in the folder res/ I have the template file email.txt
>
> Object oriented programming is completly new for me.
> How can I use the functions of class.tslib_pibase.php in my extension?
Are you making a hook or a complete plugin?
If it is a hook, use $pObj instead of $this to access functions from tslib_pibase.
--
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/duplicate_content_with_realurl/
More information about the TYPO3-english
mailing list