MyBB Community Forums

Full Version: coloured usertitle
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
how to have a coloured usertitle? for some reason if I put span style under users & groups > groups > edit user group > default user title , it's showing this

[Image: 6e15f9bd93ca59d00e18667d0b658d0e.png]
That's because HTML is not allowed there in the ACP. It will work if you put it in the postbit or postbit_classic template. If you want different colors for different groups you can use conditionals plugin.
(11-16-2018, 06:23 PM)Ashley1 Wrote: [ -> ]That's because HTML is not allowed there in the ACP. It will work if you put it in the postbit or postbit_classic template. If you want different colors for different groups you can use conditionals plugin.

I've installed the conditionals plugin, this is the code that i'm currently using

Quote:<if $GLOBALS['mybb']->user['usergroup'] == 4 then> XXXXX </if>

However, this line of code is a little different from what I want. It only show for people who is in Administrator group, when i'm on second account which is not in Administrator group, I can't see the usertitle. What I want is for Administrator, whatever is in the <if> </if> will show for everyone... but only those who are in Administrator group has it. Sorry, my english isn't that good, hope you can understand... anyways, is there anyway to fix this ?
<if $GLOBALS['mybb']->user['usergroup'] == 1 then>AAA<elseif>
<if $GLOBALS['mybb']->user['usergroup'] == 2 then>BBB<elseif>
<if $GLOBALS['mybb']->user['usergroup'] == 3 then>CCC<else>{$post['usertitle']}</if>
(11-16-2018, 06:42 PM)Ashley1 Wrote: [ -> ]<if $GLOBALS['mybb']->user['usergroup'] == 1 then>AAA<elseif>
<if $GLOBALS['mybb']->user['usergroup'] == 2 then>BBB<elseif>
<if $GLOBALS['mybb']->user['usergroup'] == 3 then>CCC<else>{$post['usertitle']}</if>

That's actually similar to what I did, if i'm on Admin account I get to AAA for everyone's usertitle. If I'm on Registered user account, i get to see normal default user title for everyone's user title including Admin's
Try
<if $post['usergroup'] == 4 then> XXXXX </if>
(11-16-2018, 07:17 PM)doylecc Wrote: [ -> ]Try
<if $post['usergroup'] == 4 then> XXXXX </if>


this worked, thank you very much Smile