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

extending Xen_Foro_Model_Avatar

#1
I want to override XenForo_Model_Avatar::gravatarExists
which invokes XenForo_Helper_Http::getClient.
There I have to add parameters for Zend Proxy. All is done in a new add on.
I have written a listener with load_class_model, but infortunately extending XenForo_Model_Avatar
does not work this way. I guess that's because 'gravatarExists' is a static method and therefore
XenForo_Model_Avatar is not instantiated.
Any suggestions how to solve this problem?
 

Jon W

Well-known member
#2
You will probably have to extend whatever it is that calls the static method -- i.e., the Account/Register controllers. Not a particularly elegant way of doing it though.
 
#3
You will probably have to extend whatever it is that calls the static method -- i.e., the Account/Register controllers. Not a particularly elegant way of doing it though.
There are three places where XenForo_Model_Avatar::gravatarExists is being called, hence a lot of work...whereas the only real change is _one_ additional line in XenForo_Helper_Http::getClient.
 

xf_phantom

Well-known member
#4
But wouldn't you need the proxy connection for ALL usages of XenForo_Helper_Http::getClient and not only for the connection to gravatar?