vbgamer45
Active member
Trying to make an addon that overrides XenForo_ViewPublic_Helper_Message but can't seem to get it to pickup. Not sure if I am using the right event_id or if I can even override that function.
Have this in the addon xml file
Then have this in the Listener
Directory structure is library\registeredlinks\ViewPublic\registeredlinks.php
Have this in the addon xml file
Code:
<code_event_listeners>
<listener event_id="load_class_view" execute_order="10" callback_class="registeredlinks_Listener_LoadClassView" callback_method="loadClassListener" active="1" description="Listens for XenForo_ViewPublic_Helper_Message class"/>
</code_event_listeners>
Code:
class registeredlinks_Listener_LoadClassView
{
public static function loadClassListener($class, &$extend)
{
if ($class == 'XenForo_ViewPublic_Helper_Message')
{
$extend[] = 'registeredlinks_ViewPublic_registeredlinks';
}
}
}