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


Discussion in 'XenForo Questions and Support' started by Smashbox, Dec 7, 2011.

  1. Smashbox

    Smashbox Member

    Sorry to make a new post on this but my last one was unclear in what I was actually looking for and then it ended up veering off into another subject, heh.

    In the picture below there is a user with multiple rank images. I am basically looking for a way to assign these images per user and not per group.


    With what I do I have a lot of people that fill multiple roles and I'd like to get them all displayed such as they have enabled on the image above.
  2. Smashbox

    Smashbox Member

    Anyone? :)
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    How are your ranks currently implemented? Did you follow a guide somewhere?
  4. Smashbox

    Smashbox Member

    They are just titles as of now that are based on group.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    A user can only have one title. There is no built-in rank system. This is probably a template modification. Maybe I can help you change it to work by user_id if you can tell me how it's currently implemented. Or I can come up with a new system for you.
  6. Smashbox

    Smashbox Member

    That would be great, I assumed what they are using in the screenshot I provided above was an addon of some sort.
    I have staff positions along with certain donor levels. Someone can be a Donor and Staff at the same time, so I'd like it to reflect that they are donators but at the same time have their staff rank show aswell just how in the screenshot the person is a Moderator AND a member of a Dev team.
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Smashbox likes this.
  8. kkm323

    kkm323 Well-Known Member

    • community staff
    • moderator
    • bukkitdec staff
    they all sound like the same to me !!:eek:
    if you want to specify group
    use this
    <xen:if is="{$user.user_group_id} == 5">
    <span class="userrank">change the title here </span>
    change number "5" to the group id number

    good luck
    Smashbox likes this.
  9. Smashbox

    Smashbox Member

    Hey there, we put this on the back burner for a while and someone finally got the time to work on it. :)

    The code above worked perfectly for the main groups. The problem we're running into now is that we need it to list all secondary groups that a user is in as well. We have about 20+ user groups and each member is in up to 5 or 6 of them. I'd like to have the main group show on the top, which it currently does, and ALL secondary groups show below it.

    Right now we're using the code above for all groups and then below those we're using this.
        <xen:if is="{$user.secondary_group_ids} == 1">
    span class="userGroup1">Group1</span>
    This actually works fine at the moment, until we add someone to more than one secondary group. It then displays only the main user group and nothing for secondary user groups. How do we need to write this out so that it displays if the secondary user group value includes instead of equals a value.
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Here is a condition to check all groups (primary and secondary):

    <xen:if is="{xen:helper ismemberof, $user, 1}">
    	<span class="userGroup1">Group1</span>
    mrGTB and Smashbox like this.
  11. Smashbox

    Smashbox Member

    Yup... thats the way to do it for sure. Thanks for the help! Nice to finally have this up and working.

Share This Page