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

if member is .. Syntax Help

Discussion in 'XenForo Questions and Support' started by tafreehm, Dec 31, 2012.

  1. tafreehm

    tafreehm Well-Known Member

    I tried to look it up here, but did not found possible solution.
    I have members ranks code setup to display user rank ribbons, which looks like this

    Code:
    <xen:if hascontent="true">
    <ul class="ranks">
    <xen:contentcheck>
        <xen:if is="{xen:helper ismemberof, $user, 3}">
            <div class="admin"></div>
     
        <xen:elseif is="{xen:helper ismemberof, $user, 69}" />
            <div class="coadmin"></div>
     
        <xen:elseif is="{xen:helper ismemberof, $user, 90}" />
            <div class="manager"></div>
     
        <xen:elseif is="{xen:helper ismemberof, $user, 78}" />
            <div class="banned"></div>
     
        </xen:if>
    </xen:contentcheck>
    </ul>
    </xen:if>
    Now I wanna add two more ranks for two specific users. I know their userid/username. But I cannot seems to add any more if condition . I tried the following query but it ended up giving that ribbon to all users.

    Code:
            <xen:if is="{$visitor.user_id} == 28240" />
            <div class="Designer"></div>
    Can someone please guide.


    Thanks
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    $visitor is the currently logged in user. You need to use $user instead.
     

Share This Page