1. 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()

Discussion in 'Closed Suggestions' started by Mike Tougeron, Aug 24, 2011.

  1. Mike Tougeron

    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,
    Mike
     
    erich37 likes this.
  2. Kier

    Kier XenForo Developer Staff Member

    This change has already been made for XenForo 1.1, along with a bunch of other changes to use callHelper() :)
     
    Mike Tougeron likes this.
  3. Mike Tougeron

    Mike Tougeron Well-Known Member

    Rock on! Thanks.
     
  4. Mike Tougeron

    Mike Tougeron Well-Known Member

    FYI, this change is not in v1.1.0-b1
     
  5. Kier

    Kier XenForo Developer Staff Member

    Really? I'll check on that and see what happened in the morning.
     
  6. Kier

    Kier XenForo Developer Staff Member

    Oops, looks like I missed that particular one while changing a bunch of others. It's done for the next release.
     
    Mike Tougeron likes this.
  7. Mike Tougeron

    Mike Tougeron Well-Known Member

Share This Page