• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Errors when creating Event Listener

So I created a Add-On called TeamSpeak and have a folder called TeamSpeak containing the Listener.php file in the folder Library. I also created a new template called teamspeak_sidebar. The code in Listener.php is as follows:

class TeamSpeak_Listener
    public static function templateHook($hookName, &$contents, $params, XenForo_Template_Abstract $template)
        if ($hookName == 'forum_list_sidebar')
            $contents .= $template->create('teamspeak_sidebar');
When trying to create the Event Listener I get an Error stating "Please enter a valid callback method". I have run through this several times and have tried searching the forums to see what I am doing wrong here with no luck. Any ideas?


Chris D

XenForo developer
Staff member
I've just done this myself with your code and it works fine...

All I can suggest is you make sure that you have a folder called TeamSpeak (case sensitive) in your library folder and also that Listener.php (also case sensitive) is in there.