How to display reputation and likes on xenforo profile?

bigexw

New member
Registered
Joined
Dec 13, 2022
Messages
4
Points
3

Reputation:

How can I display reputation and likes on xenforo profile like this image:
1674409276641.png
 

one_finger_man

Well-known member
Registered
Joined
Jan 20, 2022
Messages
298
Points
53

Reputation:

ShieldX

Well-known member
Registered
Joined
Mar 27, 2022
Messages
267
Points
28

Reputation:

bigexw

New member
Registered
Joined
Dec 13, 2022
Messages
4
Points
3

Reputation:

@one_finger_man thank you but I cant find a file called message_macro I can just find message_macros
 

one_finger_man

Well-known member
Registered
Joined
Jan 20, 2022
Messages
298
Points
53

Reputation:

if you see this pop up Accessed unknown getter 'af_as_award_total' on XF:User[1] than u will need some one else to help cause i dont know why that is causing issues
 

one_finger_man

Well-known member
Registered
Joined
Jan 20, 2022
Messages
298
Points
53

Reputation:

to remove the lines in between you have to replace this with codes


CSS:
.post-stats .post-stat:first-child {
    flex: 0 0 50%;
    border-left: 1px solid #2f3136;
}

replace it with

CSS:
.post-stats .post-stat:first-child {
    flex: 0 0 50%;
}
 

bigexw

New member
Registered
Joined
Dec 13, 2022
Messages
4
Points
3

Reputation:

thank you but I cant find a file called message_macro I can just see message_macros
 

one_finger_man

Well-known member
Registered
Joined
Jan 20, 2022
Messages
298
Points
53

Reputation:

thank you but I cant find a file called message_macro I can just see message_macros
bigexwits not a file it's in your theme message_macro

add the codes under
Code:
<div class="d-flex align-items-center justify-content-center flex-wrap post-stats">
                <div class="post-stat">
                    <span class="largetext">
                        <strong style="color:green; text-align: center;">{$user.af_as_award_total|number}</strong>
                    </span>
                    <br>
                    <span class="x-smalltext text-uppercase" style="font-weight:bold; ">Awards</span>
                </div>
                <div class="post-stat">
                    <span class="largetext"><strong style="color:green; text-align: center;">{$user.reaction_score|number}</strong></span>
                    <br> <span class="x-smalltext text-uppercase" style="font-weight:bold;">Likes</span>
                </div>
            </div>
            <p>

This above code should be put below of this line
Code:
<h4 class="message-name"><xf:username user="$user" rich="true" defaultname="{$fallbackName}" itemprop="name" /></h4><br>

Paste bellow code in the extra.less

CSS:
.d-flex {
    display: flex;
}
.d-flex {
    position: relative;
    display: flex !important;
}
@media (max-width: 650px) {
    .post-stat, .post-stats {
    display: none !important;
    }
}
.post-stat {
    flex: 0 1 50%;
    margin-left: 16px;
    text-align: center;

}
.post-stats .post-stat:first-child {
    flex: 0 0 50%;
    border-right: 1px solid #2f3136;
}
.justify-content-center {
    justify-content: center;
    margin-right: 38px;
    padding-left: 15px;
}
 
Top