MyBB Community Forums

Full Version: Displaying text based on what usergroup they are in?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like to show some different text depending on what usergroups the person is in. I don't want the text to be different for whomever looks at the postbit.

User A has a Primary Usergroup of Administrators, in his postbit it will display: Primary: Administrators.

User B has a Primary Usergroup of Trusted, in his postbit it will display: Primary: Trusted.

User C has a Primary Usergroup of Moderator, in his postbit it will display Primary: Moderator.

Hopefully that little example clears it up, basically I want to display some text on postbit depending on what usergroup the poster belongs to.
This could be done with Template Conditionals or a plugin (really easy to make).
(2017-03-10, 05:17 PM)Wage Wrote: [ -> ]This could be done with Template Conditionals or a plugin (really easy to make).

Yeah, could you give me a small example of the template conditional please? I've done something like this in the past but I don't have any of the files anymore.
Something like this should work.

<if $post['usergroup'] == 4 then>
    Primary: Administrators
<elseif $post['usergroup'] == 3 then>
    Primary: Super Moderators
<elseif $post['usergroup'] == 2 then>
    Primary: Registered
</if>

I apologize for the late reply, just now checking my recent posts/answers.