XF 2.0 Avatars instead of name in conversation list

Mr Lucky

Well-known member
I want to show mini size avatars for conversation participants in the conversation list, instead of just the name.

I’m aware there is an Addon that will do this but i’d Prefer not to buy the Addon just for that one very small function.

Can anyone pleae help with how to do this?

Thanks 🙏
 
Hi,

Can you explain more where you want to show the mini-avatar, because in XF2.0 it does show the lits of participants names along with their mini-avatars.
 
I'm only seeing the avatar for the conversation starter, not the participants.

conversationavatars.webp

(I need thavatars about half the size of the conversation start avatar on the left)

If there is an option to display as avatars please let me know where to find it!

Otherwise

I think this is where I need to change in conversation_list_macros <li><xf:username user="{$recipient}" defaultname="{{ phrase('unknown_member') }}" /></li>
 
Last edited:
You'll want to replace lines 52-54:

HTML:
<xf:foreach loop="$userConv.Master.recipients" value="$recipient" if="{$recipient.user_id} != {$userConv.Master.user_id}"><xf:trim>
                                <li><xf:username user="{$recipient}" defaultname="{{ phrase('unknown_member') }}" /></li>
                            </xf:trim></xf:foreach>

with:

HTML:
<xf:foreach loop="$userConv.Master.Recipients" value="$recipient" if="{$recipient.user_id} != {$userConv.Master.user_id}"><xf:trim>
                                <li><xf:avatar user="{$recipient.User}" size="xxs" defaultname="{{ phrase('unknown_member') }}" /></li>
                            </xf:trim></xf:foreach>

In the place you're modifying now.

Liam
 
Back
Top Bottom