Jaxel
Well-known member
This is an alteration of the design CyberAP came up with here:
http://xenforo.com/community/threads/show-user-is-online.8236/
I wanted to use his ribbon design, but I didn't want to use it for users online or anything like that. So I came up with a new design that not only looks similar, but also supports a user having multiple ribbons...
ADD TO EXTRA.css
ADD TO message_user_info ABOVE <xen:if is="!{$isQuickReply}">
This is just the beginning... a primer to start. Simple, if a user is in the "Moderator" usergroup (group #4 on my forum), it will add a Staff / Moderator ribbon underneath their avatar. In the next post, I will go into how to expand on this and add additional ribbons.
http://xenforo.com/community/threads/show-user-is-online.8236/
I wanted to use his ribbon design, but I didn't want to use it for users online or anything like that. So I came up with a new design that not only looks similar, but also supports a user having multiple ribbons...
ADD TO EXTRA.css
Code:
.ribbon { font-size: 10px; font-weight: bold; margin: -5px -5px -2px; text-align: center; }
.ribbon li
{
border-radius: 3px;
border-top-right-radius: 0px;
border-top-left-radius: 0px;
box-shadow: 0px 1px 3px rgba(0,0,0, 0.25);
padding: 1px;
position: relative;
margin-bottom: 5px;
}
.ribbon li:last-child { margin-bottom: 0px; }
.ribbon li div { position: absolute; top: -4px; width: 4px; height: 4px; }
.ribbon li .right { border-top-right-radius: 3px; right: -1px; }
.ribbon li .left { border-top-left-radius: 3px; left: -1px; }
.ribbonStaff
{
background: @primaryLight url('@imagePath/xenforo/gradients/category-23px-light.png') repeat-x top;
border: 1px solid @primaryLight;
color: @contentBackground;
}
.ribbonStaff div { background-color: @primaryLight; }
ADD TO message_user_info ABOVE <xen:if is="!{$isQuickReply}">
Code:
<xen:if hascontent="true">
<ul class="ribbon">
<xen:contentcheck>
<xen:if is="{xen:helper ismemberof, $user, 4}">
<li class="ribbonStaff">
<div class="left"></div>
<div class="right"></div>
Staff / Moderator
</li>
</xen:if>
</xen:contentcheck>
</ul>
</xen:if>
This is just the beginning... a primer to start. Simple, if a user is in the "Moderator" usergroup (group #4 on my forum), it will add a Staff / Moderator ribbon underneath their avatar. In the next post, I will go into how to expand on this and add additional ribbons.