inherit
255961
0
Mar 18, 2020 14:34:00 GMT -8
mudcake
2
August 2018
mudcake
|
Post by mudcake on Aug 5, 2018 13:21:44 GMT -8
I'm looking for a way to make user's group or rank name appear in a colored box, instead of plain text. The color of the box will depend on the user's group color (actually the same color with its username). Is this possible?
UPDATE: I did some research and I found out this colored box is called class name, however I don't understand it
Here is an example:
|
|
inherit
249320
0
Sept 16, 2019 17:45:18 GMT -8
ᴘʀɪɴᴄᴇ ᴄᴜᴘɪᴅ
beans on toast
125
September 2017
noodlestars
|
Post by ᴘʀɪɴᴄᴇ ᴄᴜᴘɪᴅ on Aug 5, 2018 16:02:29 GMT -8
i can't see the image you've provided since my internet is blocking it, but i think i understand what you're saying. go to admin > themes > layout templates > mini-profile and replace lines 5-12 (should start with {if $[user.group]}) with the following:
{if $[user.group]} <div style="background-color:#$[user.group.color];">$[user.group.name]<br />$[user.group.stars]<br /></div> {elseif $[user.rank]} <div style="background-color:#$[user.rank.color];">$[user.rank.name]<br /> {if $[user.rank.stars]} $[user.rank.stars]<br /> {/if}</div> {/if}
|
|
inherit
255961
0
Mar 18, 2020 14:34:00 GMT -8
mudcake
2
August 2018
mudcake
|
Post by mudcake on Aug 6, 2018 1:04:40 GMT -8
Thank you sooooooo much! Works like a charm Can I set a color for plain members, too ? It appears transparent because they don't have a color like members in a group do.
|
|