Marcus
Well-known member
To overwrite private function protected static function _getDefaultAvatarUrl() my plan is to overwrite the public function public static function getAvatarUrl() that uses the private one exclusively.*
How could I overwrite the public function? My addon listens on load_class_model and once the class is XenForo_Template_Helper_Core where the public function is located I extend that to my personal Core.php:
I want to disable all avatars with this test, however everything works as usual. Any ideas?
(* with the exception of gravatar functionality I disabled)
Similar thread: http://xenforo.com/community/thread...-class-and-override-protected-function.25889/
How could I overwrite the public function? My addon listens on load_class_model and once the class is XenForo_Template_Helper_Core where the public function is located I extend that to my personal Core.php:
PHP:
<?php
class MyAddon_Core extends XFCP_MyAddon_Core
public static function getAvatarUrl(array $user, $size, $forceType = '')
{ return ''; }
(* with the exception of gravatar functionality I disabled)
Similar thread: http://xenforo.com/community/thread...-class-and-override-protected-function.25889/