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

Show Secondary Groups?

Discussion in 'XenForo Questions and Support' started by Derrick Kyle LeBrocq, Oct 23, 2011.

  1. I don't know if this is the right place, but if its not, I'm sorry and please move it accordingly.

    I was wondering if there is any way to show a users secondary group in their profile? We're using the upgrade system, and it's in conjunction with a video game VIP system, so we'd like to be able to see who is who without having to give out forum admin to all the game admins. Is this possible?
     
  2. dieketzer

    dieketzer Well-Known Member

    <xen:if is="{xen:helper ismemberof, $user, 3}">
    user is member of group 3!
    </xen:if>
    that would display if the user were a member of usergroup 3
     
  3. Could I stack 3 of these on top of eachother for each of the VIP levels we have?
     
  4. dieketzer

    dieketzer Well-Known Member

    yes.
    you could create a template and call it 'secondary_groups' and even go further and include something like this:
    Code:
    <xen:if hascontent="true">
        <xen:contentcheck>
                <xen:if is="{xen:helper ismemberof, $user, 3} AND {xen:helper ismemberof, $user, 5}">
                        is member of both groups 3 and 5
                </xen:if>
                <xen:if is="{xen:helper ismemberof, $user, 3} AND !{xen:helper ismemberof, $user, 6}">
                        is both a member of group 3 and not a member of group 6
                </xen:if>
                <xen:if is="{xen:helper ismemberof, $user, 7}">
                        is member of group 7
                </xen:if>
                <xen:if is="{xen:helper ismemberof, $user, 8}">
                        is member of group 8
                </xen:if>
      </xen:contentcheck>
    </xen:if>
    the above would output whichever conditions were met.
    then in member_card or member_view or wherever you want the code to work, include this template by:
    <xen:include template="secondary_groups" />
     
  5. This doesn't appear to work anymore with 1.1.0....any ideas?
     
  6. limboclub

    limboclub Member

    What do we use now instead of this?
    {xen:helper ismemberof, $user, x}
     

Share This Page