md_5
Well-known member
Right now I have a badge system that looks like:
In order to give a user these badges I need to do 3 things.
Add color: xxxxxx; to the users custom CSS.
Add something like:
to EXTRA.css
Add something like:
To the message_user_info template
Ideally I would like to scrap EXTRA.css, and then add a check into the template, something like (pseudo code)
I know this would be perhaps better suited to a plugin, but I can't find any good info on Xen CSS / template syntax so:
In order to give a user these badges I need to do 3 things.
Add color: xxxxxx; to the users custom CSS.
Add something like:
Code:
.rankAdmin {
background: url("@imagePath/xenforo/gradients/tab-unselected-25px-light.png") #xxxxxx;
border: 1px solid #xxxxxx;
}
Add something like:
Code:
<xen:if is="{xen:helper ismemberof, $user, 6}">
<span class="rank rankDeveloper">Developer</span>
</xen:if>
Ideally I would like to scrap EXTRA.css, and then add a check into the template, something like (pseudo code)
Code:
<xen:if is="{xen:helper ismemberof, $user, 6}">
$group = getGroup(6);
<span class="rank" style="background: url("@imagePath/xenforo/gradients/tab-unselected-25px-light.png") #(substring $.group.customCSS); border: 1px solid #(substring $.group.customCSS);">$group.Name</span>
</xen:if>
I know this would be perhaps better suited to a plugin, but I can't find any good info on Xen CSS / template syntax so:
- Is it possible to look up a group via a template?
- Can I get this groups name?
- Can I get this groups custom css?
- Can I get a substring of a string?
- Can I loop through all groups?