Welcome!

Our tools are virus free and all tested by our staff, sign up and get them .

SignUp Now!

help with reputation

ElRoble

Member
Registered
Joined
Oct 8, 2019
Messages
23

Reputation:

hello good I am using this code that was shared here in this forum, it is about putting a reputation system that I must put in message_macros

HTML:
<div class="star-ranks" style="padding-top: 8px;">

<xf:if is="{$user.reaction_score} >=  1300"> <img src="/star-ranks-filled/complete-stars.png" data-xf-init="tooltip" title="Full Reputation Master">
<xf:elseif is="{$user.reaction_score} >=  1200" /> <img src="/star-ranks-filled/fullstar-10.png" data-xf-init="tooltip" title="1,200+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  1100" /> <img src="/star-ranks-filled/halfstar-10.png" data-xf-init="tooltip" title="1,100+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  1000" /> <img src="/star-ranks-filled/fullstar-9.png" data-xf-init="tooltip" title="1,000+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  900" /> <img src="/star-ranks-filled/halfstar-9.png" data-xf-init="tooltip" title="900+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  800" /> <img src="/star-ranks-filled/fullstar-8.png" data-xf-init="tooltip"title="800+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  700" /> <img src="/star-ranks-filled/halfstar-8.png" data-xf-init="tooltip" title="700+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  600" /> <img src="/star-ranks-filled/fullstar-7.png" data-xf-init="tooltip" title="600+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  500" /> <img src="/star-ranks-filled/halfstar-7.png" data-xf-init="tooltip" title="500+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  450" /> <img src="/star-ranks-filled/fullstar-6.png" data-xf-init="tooltip" title="450+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  400" /> <img src="/star-ranks-filled/halfstar-6.png" data-xf-init="tooltip" title="400+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  350" /> <img src="/star-ranks-filled/fullstar-5.png" data-xf-init="tooltip" title="350+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  300" /> <img src="/star-ranks-filled/halfstar-5.png" data-xf-init="tooltip" title="300+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  250" /> <img src="/star-ranks-filled/fullstar-4.png" data-xf-init="tooltip" title="250+ Ratings">
<xf:elseif is="{$user.reaction_score} >= 200" /> <img src="/star-ranks-filled/halfstar-4.png" data-xf-init="tooltip" title="200+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  150" /> <img src="/star-ranks-filled/fullstar-3.png" data-xf-init="tooltip" title="150+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  125" /> <img src="/star-ranks-filled/halfstar-3.png" data-xf-init="tooltip" title="125+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  100" /> <img src="/star-ranks-filled/fullstar-2.png" data-xf-init="tooltip" title="100+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  75" /> <img src="/star-ranks-filled/halfstar-2.png" data-xf-init="tooltip" title="75+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  50" /> <img src="/star-ranks-filled/fullstar-1.png" data-xf-init="tooltip" title="50+ Ratings">
<xf:elseif is="{$user.reaction_score} >=  25" /> <img src="/star-ranks-filled/halfstar-1.png" data-xf-init="tooltip" title="25+ Ratings">
    <xf:elseif is="{$user.reaction_score} <  25" /> <img src="/star-ranks-filled/empty-star.png" data-xf-init="tooltip" title="Needs 25+ Ratings for Rep">
                    </xf:if>
                    </div>

everything is fine and works 100%
the question is how can I make this code only work for everyone except the administrator and moderator

could someone help me please
 

boo

Active member
Registered
Joined
Aug 29, 2019
Messages
37

Reputation:

Not sure if this is what you want, but you can hide using a conditional statement.

Code:
 <xf:if is="{{!$xf.visitor.isMemberOf([x, y])}}">
     Hide content...
</xf:if>
 
Top

Dear User!

We found that you are blocking the display of ads on our site.

Please add it to the exception list or disable AdBlock.

Our materials are provided for FREE and the only revenue is advertising.

Thank you for understanding!