XF 1.2 Hide default avatars?

JMEWLS

Active member
If someone has not uploaded an avatar is there a conditional to hide it in the user_info next to the posts? It's confusing seeing numerous users without avatars, a lot of my community really only refer to their users by avatar.

Cheers.
 
If someone has not uploaded an avatar is there a conditional to hide it in the user_info next to the posts? It's confusing seeing numerous users without avatars, a lot of my community really only refer to their users by avatar.

Cheers.
I do not think there is away to hide, only the default avatar.

avatar_male_m.png
 
You could edit the templates and use a conditional statement: <xen:if is="{$visitor.avatar_date}>

Only those who have uploaded an avatar will have a date set.
Appreciate the reply. But wouldn't this only hide avatars for people who don't have them set? I'm wanting to remove the default avatar in the user_info.
 
Isn't that the same thing?

If they haven't uploaded an avatar then the default avatar is shown.
Sorry I think I didn't articulate my post correctly. What I meant is that people who don't have avatars would be able to see any at all?

I've added this code, I'm still able to see avatars as well as the default ones on users (I have an avatar set) . However I created a test account (with no avatar set) and they're unable to see no avatars. I simply want users to be able to see people with avatars set and remove the default avatar from the user_info.

Hopefully that makes more sense. :lol:
 
Code:
<xen:if is="{xen:helper avatar, $user, m, 'true'}">
   <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
     <div class="avatarHolder">
       <span class="helper"></span>
       <xen:avatar user="$user" size="m" img="true" />
       <!-- slot: message_user_info_avatar -->
     </div>
   </xen:hook>
   <xen:else />
   
   </xen:if>

Was trying to do something like this, but obviously didn't work :(
 
Is it possible to implement a 'helper' for if the avatar = "avatar_male_m.png" or something like that?
I'm fairly sure I understood you in the 1st post.

You want it so people see only the avatars that people upload. And if someone does not upload an avatar, everyone will see only the user name.

And no matter what they do or do not do, you want no one to see the standard default at any time ... ie.... "avatar_male_m.png" for example.


I do not think this is possible. It is either all or nothing.

This really should be a feature (in my opinion)
 
Top Bottom