• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 User Rank on Profile Page help?

Deceptive

Active member
#1
I want to add text on certain profiles for former staff members. It's styled. How can I accomplish this? It works with out the conditional statements. I have got it placed where I want it to show.

Member_view:
Code:
<xen:if is="{$user.user_id} == 324 OR {$user.user_id} == 142 {$user.user_id} == 831">
<p class="formerRank">
           Former Rank: Administrator
</p>
<xen:elseif is="{$user.user_id} == 14" />
<p class="formerRank">
           Former Rank: Global Moderator
</p>
<xen:elseif is="{$user.user_id} == 11" />
<p class="formerRank">
           Former Rank: Content Moderator
</p>
</xen:if>
Extra.css:
Code:
.formerRank {
  margin: 10px 0;
  color: rgb(59, 59, 59);
  background-color: rgb(235, 235, 235);
  text-align: center;
  padding: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -khtml-border-radius: 5px;
  border-radius: 5px;
  border: solid 1px rgb(191, 191, 191);
}


This is what it looks like:
 
Last edited:

Brogan

XenForo moderator
Staff member
#2
This line is incorrect:
Code:
<xen:if is="{$user.user_id} == 324 OR {$user.user_id} == 142 {$user.user_id} == 831">
It's missing an OR.

You can always use an array instead, which is what I do if there are 3 or more.
 

Deceptive

Active member
#3
This line is incorrect:
Code:
<xen:if is="{$user.user_id} == 324 OR {$user.user_id} == 142 {$user.user_id} == 831">
It's missing an OR.

You can always use an array instead, which is what I do if there are 3 or more.
Thank you. I didn't see that error.