• 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

R

ragtek

Guest
#1
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
Code:
    XenForo.register(
        'a.OverlayTrigger, input.OverlayTrigger, button.OverlayTrigger, label.OverlayTrigger, a.username, a.avatar',
        'XenForo.OverlayTrigger'
    );
So is it possible, or should this be moved to suggestions?:D
 

Kier

XenForo Developer
Staff member
#2
I think you can set something like class="NoOverlay" to prevent the overlay behaviour... let me check the code.
 
R

ragtek

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

Edit: thx:D
working as it should
 

Kier

XenForo Developer
Staff member
#4
Yeah, there it is:
Code:
if (isUserLink && this.$trigger.hasClass('NoOverlay'))
{
	return true;
}
 
R

ragtek

Guest
#5
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
 

Kier

XenForo Developer
Staff member
#6
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
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.
 

CyberAP

Well-known member
#7
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.
There is a CSS3 solution (background-size), but it is not IE-friendly.