XF 1.4 User Rank on Profile Page help?

Deceptive

Active member
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);
}

8c9d87d5a5119b02155c4169afecaebe.png


This is what it looks like:
3b53a4d096eb42afce1d7141144440fd.png
 
Last edited:
This line is incorrect:
Rich (BB 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.
 
Back
Top Bottom