Walky
Member
Hello !
I want to create a code event Listener !
But I can't create because I have this error when I want to save : "The server responded with an error. The error message is in the JavaScript console."
Here is my php file :
Thanks
I want to create a code event Listener !
But I can't create because I have this error when I want to save : "The server responded with an error. The error message is in the JavaScript console."
Here is my php file :
PHP:
<?php
class MessagesPredefinis_Listener
{
public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
{
if ($hookName == 'forum_list_nodes')
{
switch($hookName)
{
case 'forum_list_nodes':
$messagesPredefinis = template->create('messages_predefinis', $template->getParams());
$contents = $messagesPredefinis . $contents;
break;
}
}
}
}
Thanks