Adding more than one user rank?

BioRage

Member
Hello,

I'm looking to add more than one user rank on my current forum[Under each existing rank]:

Untitled.webp
Like that, but have more than one++ of that below;

I know that you can add it via user-group, but it's tedious to make that man ranks for certain users;

For example if user is a

Moderator + Donator + Coder; I would like it to show like that.

Anyone know about the ways of doing this?

I want it like this (image below)

aaa.webp
but without adding it to each user group, instead I can easily add it perhaps by just clicking these for example;

Untitled.webp

Anyone have any ideas on how about to do this?

Thank you!
 
I would edit the postbit/avatar template and use conditionals, in other words, is the member in group X if so display a particular graphic. Then the graphics can be cumulative (stacked). You'd still need to add them to secondary usergroups, but those groups could just have no effect other than showing these ranks.
 
I would edit the postbit/avatar template and use conditionals, in other words, is the member in group X if so display a particular graphic. Then the graphics can be cumulative (stacked). You'd still need to add them to secondary usergroups, but those groups could just have no effect other than showing these ranks.

Could you perhaps aid me? As I am very unfamiliar with coding :notworthy:
 
Have a look at this: http://xenforo.com/community/threads/usergroup-checking-in-the-templates.9447/

Change the usergroup to match the ID of the group you want to check and display a rank for. Then just do these one after the other, example for groups 4 and 5:

Code:
<xen:if is="{xen:helper ismemberof, $visitor, 4}">
    <img src="group4rank.jpg"></br>
</xen:if>
<xen:if is="{xen:helper ismemberof, $visitor, 5}">
    <img src="group5rank.jpg"></br>
</xen:if>

I'm afraid I don't know what template you need to edit, the template where the avatar is shown, maybe someone else can help with that bit.
 
OK, you need to use this code:

Code:
<xen:if is="{xen:helper ismemberof, $user, 6}">
    something to display</br>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 7}">
    something else to display</br>
</xen:if>

You need to use $user not $visitor as I said before. Change 6 and 7 to whatever groups you want to check for. To make sure this works before adding images, just stick a full stop in to display, such as:

<xen:if is="{xen:helper ismemberof, $user, 6}">
.</br>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 7}">
..</br>
</xen:if>

Go into template message_user_info and at the very the bottom find:

Code:
</xen:hook>
            </xen:if>
            </xen:contentcheck>
        </div>
    </xen:if>
 
STICK THE CODE HERE
     
</xen:if>
 
    <span class="arrow"><span></span></span>
</div>
</div>

Cut and paste the code where I have typed STICK THE CODE HERE :)

Add extra checks for other groups just by adding more checks, such as:

Code:
<xen:if is="{xen:helper ismemberof, $user, 6}">
    something to display</br>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 7}">
    something else to display</br>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 8}">
    something else to display</br>
</xen:if>

Once you know it works just replace the . with something you want to show, like an html <img> tag. Just remember </br> after each one to insert a line break, then they will stack, rather than being all in a line.
 
That's the limit of my expertise I'm afraid - the code is correct but you will need to add a div to center it (or a CSS class) and move it further up the template so it displays before the medal. But as I don't use the medal plugin I can't test this in my own forum. Hopefully someone else will take it from here... :)
 
That's the limit of my expertise I'm afraid - the code is correct but you will need to add a div to center it (or a CSS class) and move it further up the template so it displays before the medal. But as I don't use the medal plugin I can't test this in my own forum. Hopefully someone else will take it from here... :)

Haha, no problem... You helped me a lot, I actually like how they are now..

I just added

Code:
<center>
<xen:if is="{xen:helper ismemberof, $user, 6}">
    something to display</br>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 7}">
    something else to display</br>
</xen:if>
<xen:if is="{xen:helper ismemberof, $user, 8}">
    something else to display</br>
</xen:if>
</center>

Thanks again!!
 
Back
Top Bottom