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

alternative URL for avatar helper

Discussion in 'XenForo Development Discussions' started by ragtek, Sep 6, 2011.

  1. ragtek

    ragtek Guest

    I've set a alternative url in the xf template avatar helper, but it's loading always as a xf overlay.
    How can i stop opening it as overlay?

    The problem is, every link with the avatar class(which can't be disabled) will be in an overlaytrigger
            'a.OverlayTrigger, input.OverlayTrigger, button.OverlayTrigger, label.OverlayTrigger, a.username, a.avatar',
    So is it possible, or should this be moved to suggestions?:D
  2. Kier

    Kier XenForo Developer Staff Member

    I think you can set something like class="NoOverlay" to prevent the overlay behaviour... let me check the code.
    ragtek likes this.
  3. ragtek

    ragtek Guest

    aaaaaaaaah, just found in the js show function, that i can add NoOverlay class

    Edit: thx:D
    working as it should
  4. Kier

    Kier XenForo Developer Staff Member

    Yeah, there it is:
    if (isUserLink && this.$trigger.hasClass('NoOverlay'))
    	return true;
  5. ragtek

    ragtek Guest

    Is there any "rule" when the avatar should be a img and when it should be shown as a span element?

    Finally i realised WHY there are sometimes img tags and sometimes span elements, BUT i don't understand why/where to use what:D
    Floris likes this.
  6. Kier

    Kier XenForo Developer Staff Member

    If we resize the avatar to something other than 48px, 96px or full size, it has to be an <img /> tag, because we can't scale the background image used on the <span> version.
    ragtek likes this.
  7. CyberAP

    CyberAP Well-Known Member

    There is a CSS3 solution (background-size), but it is not IE-friendly.
  8. Kier

    Kier XenForo Developer Staff Member

    Exactly - so there might as well not be one :)
    Cezz and James like this.

Share This Page