[TYPO3] Extension "comments" notification without the need to approve each comment?
Thomas Hirt
info at thomas-hirt.at
Wed Oct 1 18:51:25 CEST 2008
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?
Hope someone can help me...
Greetings,
Thomas
Dmitry Dulepov schrieb:
> Hi!
>
> Thomas Hirt wrote:
>> I am at the moment trying to write my first extension.
>> Obviously I have some Problem:
>>
>> Why this line isn't working:
>> $toEmail = $this->conf['spamProtect.']['notificationEmail'];
>> I know that this array comes out of the extension comments.
>> I use a hook inside of this extension.
>>
>> Where can I get the content of the array
>> conf['spamProtect.']['notificationEmail']?
>
> The manual says that you have a reference to the calling object inside
> the hook as $pObj. So use $pObj->conf['spamProtect.']['notificationEmail'].
>
More information about the TYPO3-english
mailing list