x4rl
Well-known member
Well ive been trying to get a template to be added at a hook without any luck...
If someone has time could you show me where ive gone wrong?
This is my Listener
Thanks muchy
If someone has time could you show me where ive gone wrong?
This is my Listener
PHP:
<?php
class VKtwitter_Listener_Template
{
public static function templateCreate(&$templateName, array &$params, XenForo_Template_Abstract $template)
{
switch ($templateName)
{
case 'member_view':
{
$template->preloadTemplate('VKtwitter_main');
break;
}
}
}
public static function templateHook($name, &$contents, array $params, XenForo_Template_Abstract $template)
{
switch ($templateName)
{
case 'member_view_sidebar_middle2':
{
$contents .= $template->create('VKtwitter_main', $template->getParams());
break;
}
}
}
}
Thanks muchy
