XF 2.2 Username CSS shown to specific usergroups

twollert

Active member
I have a special usergroup for deleted users (using the Member Self Delete add-on). Now I would like to see the usernames of this group with a line-through as a administrator/moderator (= the same behavior like with banned users).

When I put "text-decoration: line-through;" in the username CSS of the group, the strikethrough username is of course shown to all visitors of the forum. How can I make it only show up for the administrator/moderator group?

Username_CSS.png
 
You can't by default. You'd have to use template conditionals or an addon everywhere the rich username styling shows to say if USER is_banned and VISITOR is_moderator OR VISITOR is_admin.

Not sure it's worth it.
 
You can't use xenforo syntax in the less templates. You'd have to edit the templates and add an identifier to banned users names only if the visitor is a mod/admin that you could then target in extra. Still requires template mods to apply the class to banned users though.

Unless I'm missing something.
 
Top Bottom