- Joined
- Jan 21, 2022
- Messages
- 793
- Points
- 153
Reputation:
Hello,
A friend of mine coded that for me a while back for my theme, thought of sharing it with the greatest XF Nulled community to its existence.
It's a hard-code solution, I am pretty sure you can achieve the same with trophies + user pomotions, but yeah. Here is the code for lazy people.
For years, it's pretty much self-explanatory, you can take the CSS from above as framework.
Demo: https://wowemu.org/threads/valentines-day-2023-event.560/
Note: My theme is custom-made and is not for sale. I got quite a lot of messages since I posted this guide, just wanted to make it clear.
A friend of mine coded that for me a while back for my theme, thought of sharing it with the greatest XF Nulled community to its existence.
It's a hard-code solution, I am pretty sure you can achieve the same with trophies + user pomotions, but yeah. Here is the code for lazy people.
HTML:
## Add after <xf:macro name="user_info" arg-user="!" arg-fallbackName=""> ###
<xf:set var="$monthsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30)) }}</xf:set>
<xf:set var="$yearsOld">{{ number(($xf.time - $user.register_date) / (60 * 60 * 24 * 30 * 12)) }}</xf:set>
## Add at the bottom of your postbit ##
<xf:if is="$monthsOld < '12'">
<div style="margin-top:5px;margin-bottom:5px;">
<div class="service-tag user-service--postbit ">
<div class="type-month-{$monthsOld}">{$monthsOld} months of service</div>
</div>
</div>
<xf:else />
<div style="margin-top:5px;margin-bottom:5px;">
<div class="service-tag user-service--postbit">
<div class="type-year-{$yearsOld}">{$yearsOld} years of service</div>
</div>
</div>
</xf:if>
CSS:
/*-------------------------------------------------------------------------*/
/* Years of Service
/*-------------------------------------------------------------------------*/
.type-month-1,
.type-month-2,
.type-month-3,
.type-month-4,
.type-month-5,
.type-month-6,
.type-month-7,
.type-month-8,
.type-month-9,
.type-month-10,
.type-month-11
{
color: hsl(199, 100%, 54%);
border-bottom-style: solid;
border-width: 2px;
}
.service-tag {
order: 9;
width: 85%;
padding: 4px 6px;
text-align: center;
border-radius: 1px;
font-size: 11px;
text-shadow: none;
text-transform: uppercase;
margin: 3px auto 0 auto;
margin-bottom: 5px;
font-weight: bold;
background: hsl(0, 0%, 7%);
}
For years, it's pretty much self-explanatory, you can take the CSS from above as framework.
Demo: https://wowemu.org/threads/valentines-day-2023-event.560/
Note: My theme is custom-made and is not for sale. I got quite a lot of messages since I posted this guide, just wanted to make it clear.
Last edited: