XF 2.0 Today's Birthday: show nicknames

interforo

Active member
Hi,
for the today's birthday widget I would like to show nicknames instead of avatars.
How can I do that?

Thanks
 
Hi,
I did it via a template modification of "widget_birthdays"

Find:
Code:
                <ul class="listHeap">
                    <xf:foreach loop="$users" value="$user">
                        <li>
                            <xf:avatar user="$user" size="s" img="true" />
                        </li>
                    </xf:foreach>
                </ul>

Replace
Code:
                <ul class="listInline listInline--comma">
                    <xf:foreach loop="$users" value="$user">
                        <xf:trim>
                            <li><xf:username user="$user" rich="true" /><xf:if is="$user.Profile.birthday.age">({$user.Profile.birthday.age})</xf:if></li>
                        </xf:trim>
                    </xf:foreach>
                </ul>

Note this also displays the age in parenthesis. If you don't want that, remove the stuff after the "if"

HTH,
-Markus
 
Top Bottom