• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 If member is in usergroup x - show visual cue to mods / admins *only*

CyclingTribe

Well-known member
#1
I've created a usergroup and manually added a select group of members into it.

I'd like mods / admins to be able to visually identify this group by, for example, a change of avatar background colour or some text string under their username (please don't suggest a custom usergroup title - you cannot wrap conditionals around them!).

However, I don't want anyone else to see this visual cue.

How do I write a conditional that says ...

<if person viewing is a moderator or administrator ... and ... person posting is in usergroup X>
Do this different thing
<else>
Do the usual thing
<end>

Any help appreciated. (y)

Cheers,
Shaun :D
 
Last edited:

CyclingTribe

Well-known member
#5
Just to check ... the is_admin and is_moderator refers to the viewer, right - the person to whom the change will be rendered?

And the ... ismemberof, $user, 21 - refers to the poster who's avatar/message is being rendered?