XF 1.5 Custom Message Background Color for Specific Group?

Exemption

Active member
I know you can do it for staff but can you do it for specific user groups?

jzdhwrO.png
 
Hope this helps! 2015-08-30_2243 - Joshie787's library - If not you can add me on Steam or something and I can walk you through it.

You add the xen helper string to messages and not extra.css
Hmm this is what I have currently:

EXTRA.CSS
Code:
.message.owner {
background-color: #FF8787;
}

MESSAGE
Code:
<xen:require css="message.css" />
<xen:require css="bb_code.css" />
<xen:require css="xb_message.css" />

<li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_staff}', 'staff'} {xen:if '{xen:helper ismemberof, $message, 3}', 'owner'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
<xen:if is="@xb_message_layout == 1 OR @xb_message_header">
    <div class="messageHeading">

Of course not all of them, only the main area where the code is involved.
 
Hmm this is what I have currently:

EXTRA.CSS
Code:
.message.owner {
background-color: #FF8787;
}

MESSAGE
Code:
<xen:require css="message.css" />
<xen:require css="bb_code.css" />
<xen:require css="xb_message.css" />

<li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_staff}', 'staff'} {xen:if '{xen:helper ismemberof, $message, 3}', 'owner'} {xen:if $message.isIgnored, ignored}" data-author="{$message.username}">
<xen:if is="@xb_message_layout == 1 OR @xb_message_header">
    <div class="messageHeading">

Of course not all of them, only the main area where the code is involved.

And this is how your css is now (or was, looks like it was removed after I looked) showing

<li id="post-5914" class="message staff owner " data-author="Exemption">

So you have yourself marked as staff still, and it added owner to the end. Remove yourself from the staff list and it'll show up as class=message owner, or you can try
.message.staff owner {
background-color: #FF8787;
}
 
Last edited:
And this is how your css is now (or was, looks like it was removed after I looked) showing

<li id="post-5914" class="message staff owner " data-author="Exemption">

So you have yourself marked as staff still, and it added owner to the end. Remove yourself from the staff list and it'll show up as class=message owner, or you can try
.message.staff owner {
background-color: #FF8787;
}

If you have steam feel free to add me, Joshie787 - I can walk you through it better
Done but how do I do the whole message? Not just the box Screenshot
 
Done but how do I do the whole message? Not just the box Screenshot

Weird..on my forums it makes the entire thing the proper color (2015-08-30_2336 - Joshie787's library)

What theme are you using? Could just be how it's styled. I looked at your css and I actually couldn't find the css string anymore (but it could just be I did something wrong)

Got it, you made the message content red, not the actual class you need.

You have
.owner .messageContent {
background-color: #FF8787;
}

You need

.message.staff.owner {
background-color: #FF8787;
}

Like this

2015-08-30_2342 - Joshie787's library
 
Last edited:
Top Bottom