[TYPO3] Extension "comments" notification without the need to approve each comment?

Dmitry Dulepov dmitry at typo3.org
Fri Oct 3 12:59:08 CEST 2008


Hi!

Thomas Hirt wrote:
> CODE
> $templateCode = $pObj->cObj->fileResource($conf['templateFile']);
> var_dump ($templateCode);
> 
> RETURNS
> NULL
> 
> So I think "$conf['templateFile']" is the problem.
> How can I fill my variable with the content of the file 
> "ext_typoscript_setup.txt" where I have the following code:
> 
> plugin.tx_commentsemail_pi1.templateFile = EXT:comments_email/res/email.txt

$conf is for comments, not for your extension. You do not have a plugin, you have a hook. So add a new options to setup of the comments extension:

plugin.tx_comments_pi1.tx_commentsemail_templateFile = EXT:comments_email/res/email.txt

Now you can fetch it:
$templateCode = $pObj->cObj->fileResource($conf['tx_commentsemail_templateFile']);

> Thanks for that code snippet. But I cannot get it to work.
> It return the string I put in...

I can't check it now, no time, sorry :(

-- 
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