Warchamp7 Active member Mar 14, 2014 #1 I'd like to hide the avatar block for any user without an avatar. How best can I go about this, since XenForo outputs the s, m or l sizes in the <img> tag for default avatars.
I'd like to hide the avatar block for any user without an avatar. How best can I go about this, since XenForo outputs the s, m or l sizes in the <img> tag for default avatars.
P Paul B XenForo moderator Staff member Mar 14, 2014 #2 You could try using a conditional statement in the template: Code: <xen:if is="!{$visitor.avatar_date} AND !{$visitor.gravatar}"> Content to remove here </xen:if> Upvote 0 Downvote
You could try using a conditional statement in the template: Code: <xen:if is="!{$visitor.avatar_date} AND !{$visitor.gravatar}"> Content to remove here </xen:if>
Warchamp7 Active member Mar 14, 2014 #3 Hmm, sound concept, but it hides all avatars, including people who have set one :/ Upvote 0 Downvote
Warchamp7 Active member Mar 14, 2014 #4 Ah, silly me. Visitor isn't what I want in this case. Changed it to: Code: <xen:if is="{$user.avatar_date} OR {$visitor.gravatar}"> Hides the avatars in posts for users who don't have one. My initial post may not have been totally clear on the behaviour I wanted Upvote 0 Downvote
Ah, silly me. Visitor isn't what I want in this case. Changed it to: Code: <xen:if is="{$user.avatar_date} OR {$visitor.gravatar}"> Hides the avatars in posts for users who don't have one. My initial post may not have been totally clear on the behaviour I wanted