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

XF 1.5 Usergroup Post color

Xyphien

Active member
#1
Alright. Not sure if any of you have ever seen the runescape forums. If a Jagex Mod(admin) posts their background is gold. If a forum mod posts their background is a nice green.


So, for example, when you post right now the post is white:

upload_2015-8-2_11-33-16.png

I'd like it so if for example couchred123 was a VIP member his post would have a gold tent to it. Something like this:

Untitled-2.png

This was done in photoshop, and just thrown together, but something along those lines where you can make the background of the post for a specific usergroup be a different color. Is there any way to do this?
 

Steve F

Well-known member
#2
There is a "staff" class by default you can use in the CSS but that does both admin/moderators. To do anymore you would need to add a conditional to separate admins and mods.

Example with the staff class.
 

Adam K M

Active member
#3
@Xyphien you can also make a custom template edit to the template messages to include a CSS class along the lines of "group_GroupName" to apply special styling for groups which aren't staff. Best of luck!
 
#4
In case anyone didn't know how to do this (I totally was lost for a bit!) you'd edit message(s) and on line 4 inbetween the staff code and the ignored code and add something like this

Code:
{xen:if '{xen:helper ismemberof, $message, X}', 'donator'}
X being Usergroup ID

Then in your Extra.css you'd add

Code:
.message.donator {
    background-color: colorcodehere;
}
For my site I added an image to the top right so it looks like


If you get confused hit me up! Would be glad to show ya how to do it.
 
Last edited: