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

Lack of interest [suggestion] disable avatar placeholder image in threads

Jesepi

Well-known member
#1
Many of my users choose to not use an avatar, so the forum is filled with a bunch of placeholder images under people's names. Instead of that, I would like an option (possibly per-theme assigned just like post count/registration dates?) to disable these placeholder images and just display the username within a thread.
 

Brogan

XenForo moderator
Staff member
#4
You can do this very easily with a template edit.

Open the message_user_info template and find this line and delete it.

HTML:
<div class="avatarHolder"><xen:avatar user="$user" size="m" itemprop="photo" /></div>
You will also need to edit quick_reply to tidy that up due to the missing avatar block.

Delete this:

HTML:
	<xen:include template="message_user_info">
		<xen:map from="$visitor" to="$user" />
		<xen:set var="$isQuickReply">1</xen:set>
	</xen:include>
 

Andrew

Well-known member
#5
You can do this very easily with a template edit.

Open the message_user_info template and find this line and delete it.

HTML:
<div class="avatarHolder"><xen:avatar user="$user" size="m" itemprop="photo" /></div>
You will also need to edit quick_reply to tidy that up due to the missing avatar block.

Delete this:

HTML:
	<xen:include template="message_user_info">
		<xen:map from="$visitor" to="$user" />
		<xen:set var="$isQuickReply">1</xen:set>
	</xen:include>
Ahh that is a very good suggestion. However, I believe that may only be a short-term fix. As new updates for XF roll out this template modification would have to be readded as that template changes. A long term fix may be to replace the default avatar images with a clear/blank 1x1 pixel spacer image. The avatar image would still exist but would be no more than 1kb and not visible.

Avatar Images:
avatar_l.png
avatar_m.png
avatar_s.png
avatar_female_l.png
avatar_female_m.png
avatar_female_s.png
avatar_male_l.png
avatar_male_m.png
avatar_male_s.png
 

Jesepi

Well-known member
#6
The above template edit suggestion completely removes avatars, which isn't what this suggestion is about.

This suggestion is to have the avatar placeholder images not present at all. The lack of an avatar is enough of an indication that a user has not chosen to upload/select one. The above suggestion of changing the image to a 1x1 pixel image still leaves an empty box. I would much prefer things just gracefully move up and occupy the space where the avatar would have been.
 

Brogan

XenForo moderator
Staff member
#9
I see.
So you want differing message templates depending on whether a user has uploaded an avatar or not.

That's probably possible but it would involve querying the DB and using a conditional statement in the template.

You could try asking in the add-ons forum.
 
#10
I would also like this feature implemented.

I don't want to force everyone to create an avatar and I don't think it looks good to have a page full of default images.
 

Andy.N

Well-known member
#11
I would love the ability for users to not display avatar, right next to the option to turn off signature.
This should be user's choice, not side-wide option
 
#12
I would love the ability for users to not display avatar, right next to the option to turn off signature.
This should be user's choice, not side-wide option
Hell yes. Many of our current vb4 users are strongly against Avatars (which are turned off in our vb installation).

We've made a custom style for No Avatars in XF, but it needs a lot of template edits!
A checkbox to turn avatars off, or replace them site-wide with a replacement generic image would be very useful indeed.
 
#13
This is outdated as the templates have changed and I was looking for a way to do this. To get rid of the placeholder avatar in the member list and next to each post. (Minus the quick reply. I like it there and it sets it apart from other forum software.)

How would I go about doing this now? I've tried searching but have had no luck. And I have to agree it would be nice to have an on/off switch for this. Thanks!
 

Garamond

Well-known member
#15
I also would like an easy option to remove the avatar placeholder in threads when a user doesn't have an avatar, since XenForo doesn't provide a way to force my users to upload an avatar.

If mandatory avatar isn't supported, why then show this question-mark or the likes, at all? After only 4 months of running my XF-forum this is one of the things that's getting annoying now.

If the reason behind this is thought through, I would very much love to hear what it is - because as it is now it seems half-baked. Sorry for my somewhat harsh choice of words :)
 
#18
You can do this very easily with a template edit.

Open the message_user_info template and find this line and delete it.

HTML:
<div class="avatarHolder"><xen:avatar user="$user" size="m" itemprop="photo" /></div>
You will also need to edit quick_reply to tidy that up due to the missing avatar block.

Delete this:

HTML:
    <xen:include template="message_user_info">
        <xen:map from="$visitor" to="$user" />
        <xen:set var="$isQuickReply">1</xen:set>
    </xen:include>
Does this still work? The code looks slightly different and I do not want to cause any damage. :)