• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

User Status Ribbons (based on Usergroups)

Am I posting this again? Anyways, I want to have different colors, and based on usergroups. Any help?
 
*bump*
Actually, my main question is just how to change the colors on the ribbons. I already know these are based on usergroups :P
 
*bump*
Actually, my main question is just how to change the colors on the ribbons. I already know these are based on usergroups :p
Just change the value of the background: or background-color: property (use the former if you want a gradient or something; latter for just a color) under the .ribbonStaff selector (or whatever other class you have for that specific usergroup). For example, if I want my staff usergroup to have a red banner, I'd use:

Code:
.ribbonStaff {
background-color: #FF0000;
}

Change that hex code to suit your desired color.
 
This is an incredible addon.. Easy to customize once you get into the gist of it all. Thank you for your work again Jaxel and those whom gave the extra little help as well (Had to make sure I understood some things. :P).
 
Can't get the ribbon itself to show up at all :( Just the text. Someone said it stopped working when they updated to 1.0.3, any ideas? This would be great for my site.
 
Thank you so much for this, Jaxel. I'm sure this must be handy for lots of forums. :)

As for your in_array question, you want something like:
Code:
<xen:if is="in_array({$user.user_id}, array(X,Y,Z))">
    <li class="ribbonAlienInvasion">
        <div class="left"></div>
        <div class="right"></div>
        Alien Invasion
    </li>
</xen:if>

Replace X,Y,Z with a comma-separated list of the user IDs of the users you want to have this ribbon.
I couldn't get the array to work. It gives an Invalid condition expression error for the line containing
Code:
<xen:if is="in_array({$user.user_id}, array(X,Y,Z))">

Could someone please help with this? :)
 
Just to update, I got the array working by putting the user ID in quotes, i.e.

Code:
<xen:if is="in_array({$user.user_id}, array('X','Y','Z'))">

Thank you James. :)
 
Top Bottom