Liam W
in memoriam 1998-2020
I'm trying to make my first xenForo mod, and am having trouble
I have tried making a code event listener, I have the file (I followed the tutorial), and I named the class and the function, however when I enter those details into the code event listener thing it gives me an error when I try and save it.
This is my LoadClassController.php file (saved in <forum root>/Library/CPFirewall/Listener):
When I enter CPFirewall_Listener_LoadClassController :: loadClassListener in the code event listener create page, it gives me an error when I save, saying I have to enter a valid callback method.
Any help? What I am doing wrong? I am very new to xenForo, so yeah
I have tried making a code event listener, I have the file (I followed the tutorial), and I named the class and the function, however when I enter those details into the code event listener thing it gives me an error when I try and save it.
This is my LoadClassController.php file (saved in <forum root>/Library/CPFirewall/Listener):
PHP:
<?
class CPFirewall_Listener_LoadClassController
{
public static function loadClassListener($class, &$extend)
{
if ($class == 'XenForo_ControllerAdmin_Login')
{
$extend[] = 'CPFirewall_ControllerAdmin_EmailLogin';
}
}
}
When I enter CPFirewall_Listener_LoadClassController :: loadClassListener in the code event listener create page, it gives me an error when I save, saying I have to enter a valid callback method.
Any help? What I am doing wrong? I am very new to xenForo, so yeah