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

Implemented Change static call to dynamic call in XenForo_Template_Helper_Core::avatarHtml()

Mike Tougeron

Well-known member
The public static variable XenForo_Template_Helper_Core::$helperCallbacks can be used to override XenForo's pre-defined avatar url builder. In the case of IGN.com we already have an avatar system in place so by changing the value in that static variable I can make everywhere use IGN's avatar building code except for when avatarHtml() is called.

In library/XenForo/Template/Helper/Core.php the function XenForo_Template_Helper_Core::avatarHtml() on line 1444 calls:
$src = self::helperAvatarUrl($user, $size, $forceType, $canonical);
Can that please be changed to:
$src = call_user_func(self::$helperCallbacks['avatar'], $user, $size, $forceType, $canonical);

Thanks for your help,