• Do not create multi-accounts, you will be blocked! For more information about rules, limits, and more, visit the, Help page.
    Found a dead link? report button!
    Make this beautiful and clickable botton with link

Xenforo Tutorial Add avatar in titles in Xenforo

Codes MagicCodes Magic is verified member.

Administrator
Administrator
Moderator
Points 5,569
Solutions 0
Codes MagicCodes Magic is verified member.
‎1 Year of Service‎
Compatible XF Versions
XF 2.0,
Screenshot_20250305-201858.webp
Here’s a modification I tested on XF 2.1. On XF 2.0, I use the add-on [XenGenTr] XenTitleAvatar, but it doesn’t work on XF 2.1.


In your thread_view template, search for:
HTML:
<li>
            <xf:fa icon="fa-clock" title="{{ phrase('start_date')|for_attr }}" />
            <span class="u-srOnly">{{ phrase('start_date') }}</span>

            <a href="{{ link('threads', $thread) }}" class="u-concealed"><xf:date time="{$thread.post_date}" /></a>
        </li>

add this code

HTML:
<div class="XenKonuAvatarBG">
            <xf:avatar user="$thread.User" size="s" defaultname="{$fallbackName}" itemprop="image" />
            </div>

In your extra.less add:

CSS:
.XenKonuAvatarBG {
    float: left;
    margin-right: 8px;
    margin-top: -33px;
}
.p-title-value { margin-left: 5%; }
 

Be clear and specific: Instead of saying "it doesn't work" , provide details, logs, screenshots, or a description of the problem.

Back