Theme editor

Guide XenForo User Reputation System

Kreathex

I love this place!
Corporate User
Thread owner
Customize your forum by creating a reputation system without using any plugins.

As users receive more likes, their reputation stars will increase.
Below is the list of like counts required for each reputation level:

Likes: 25 – 50 – 75 – 100 – 125 – 150 – 175 – 200 – 250 – 300 – 350 – 400 – 450 – 500 – 600 – 700 – 800 – 900 – 1000 – 1100 – 1200 – 1300

1762293039364.webp


Open the message_macros template of your theme and find the following code section:
Code:
<xf:userbanners user="$user" tag="div" class="message-userBanner" itemprop="jobTitle" />
Add the following codes right below that section and save the template:
Code:
<div class="xtr_star-ranks" style="text-align: left; padding: 2px 0; margin: 2px 0;">
 <xf:if is="{$user.reaction_score} >=  1300">
        <img src="{{ base_url('star-ranks-filled/complete-stars.png') }}" data-xf-init="tooltip" title="Full Reputation Master">
    <xf:elseif is="{$user.reaction_score} >=  1200" />
        <img src="{{ base_url('star-ranks-filled/fullstar-10.png') }}" data-xf-init="tooltip" title="1,200+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  1100" />
        <img src="{{ base_url('star-ranks-filled/halfstar-10.png') }}" data-xf-init="tooltip" title="1,100+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  1000" />
        <img src="{{ base_url('star-ranks-filled/fullstar-9.png') }}" data-xf-init="tooltip" title="1,000+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  900" />
        <img src="{{ base_url('star-ranks-filled/halfstar-9.png') }}" data-xf-init="tooltip" title="900+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  800" />
        <img src="{{ base_url('star-ranks-filled/fullstar-8.png') }}" data-xf-init="tooltip" title="800+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  700" />
        <img src="{{ base_url('star-ranks-filled/halfstar-8.png') }}" data-xf-init="tooltip" title="700+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  600" />
        <img src="{{ base_url('star-ranks-filled/fullstar-7.png') }}" data-xf-init="tooltip" title="600+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  500" />
        <img src="{{ base_url('star-ranks-filled/halfstar-7.png') }}" data-xf-init="tooltip" title="500+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  450" />
        <img src="{{ base_url('star-ranks-filled/fullstar-6.png') }}" data-xf-init="tooltip" title="450+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  400" />
        <img src="{{ base_url('star-ranks-filled/halfstar-6.png') }}" data-xf-init="tooltip" title="400+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  350" />
        <img src="{{ base_url('star-ranks-filled/fullstar-5.png') }}" data-xf-init="tooltip" title="350+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  300" />
        <img src="{{ base_url('star-ranks-filled/halfstar-5.png') }}" data-xf-init="tooltip" title="300+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  250" />
        <img src="{{ base_url('star-ranks-filled/fullstar-4.png') }}" data-xf-init="tooltip" title="250+ Ratings">
    <xf:elseif is="{$user.reaction_score} >= 200" />
        <img src="{{ base_url('star-ranks-filled/halfstar-4.png') }}" data-xf-init="tooltip" title="200+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  150" />
        <img src="{{ base_url('star-ranks-filled/fullstar-3.png') }}" data-xf-init="tooltip" title="150+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  125" />
        <img src="{{ base_url('star-ranks-filled/halfstar-3.png') }}" data-xf-init="tooltip" title="125+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  100" />
        <img src="{{ base_url('star-ranks-filled/fullstar-2.png') }}" data-xf-init="tooltip" title="100+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  75" />
        <img src="{{ base_url('star-ranks-filled/halfstar-2.png') }}" data-xf-init="tooltip" title="75+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  50" />
        <img src="{{ base_url('star-ranks-filled/fullstar-1.png') }}" data-xf-init="tooltip" title="50+ Ratings">
    <xf:elseif is="{$user.reaction_score} >=  25" />
        <img src="{{ base_url('star-ranks-filled/halfstar-1.png') }}" data-xf-init="tooltip" title="25+ Ratings">
    <xf:elseif is="{$user.reaction_score} <  25" />
        <img src="{{ base_url('star-ranks-filled/empty-star.png') }}" data-xf-init="tooltip" title="Rep için 25+ Oy Gerekiyor">
    </xf:if>
                   
</div>
Add the following code to the extra.less template of the theme you are using:
Less:
@media (max-width: 650px) {
.xtr_star-ranks {
    display:none;
}
    }
Finally, download the file and upload it to your forum’s root directory.
That’s it — the process is complete.
 

Attachments

Back
Top