XF 2.1 Change color of posts in the moderation queue

djbaxter

in memoriam 1947-2022
I'm looking for a way to better highlight moderated posts to make them easier for moderators and administrators to see.

What's the best/easiest way to do this?
 
Need to make a template edit I believe to expose the moderated status.

Template: post_macros
Find:
Code:
<article class="message message--post js-post js-inlineModContainer {{ $isIgnored ? 'is-ignored' : '' }} {{ $post.isUnread() ? ' is-unread' : '' }}"

Change to:

Code:
<article class="message message--post js-post js-inlineModContainer {{ $isIgnored ? 'is-ignored' : '' }} {{ $post.isUnread() ? ' is-unread' : '' }}{{ $post.message_state == 'moderated' ? ' is-moderated' : '' }}"

Then css in template: extra.less

Code:
.block--messages .message.is-moderated {
    border: 5px solid rgb(255, 0, 0);
}

Result:
Screenshot_7.png

Of course, with the class, you can style anything you want.
 
Last edited:
I'm looking for a way to better highlight moderated posts to make them easier for moderators and administrators to see.
I just made the phrase itself bold and colored it red by editing the text of the phrase like so:

<b><color=red>This message is awaiting moderator approval, and is invisible to normal visitors.</b></c>

So it looks like:

modpost.jpg

In ACP it looks like:

modphrase.webp
 
@manster your solution didn't work in my style, even correcting the HTML markup.
Well. We tried. I guess we see now why markup isn't recommended in phrase text.

BUT - if you liked the effect, it should be possible for a simple extra.less addition just for the alert box itself not for the entire post like you're asking?

You should be able to style .messageNotice--moderated in extra.less?
 
Actually the problem is that you changed the wrong phrase.

It should be this one: awaiting_approval_before_being_displayed_publicly

Then in the phrase translation, use this:

Code:
<span style="color:red; font-weight: bold;">
Awaiting approval before being displayed publicly.
</span>

202828

The solution from @Russ also works but this one is a bit more subtle.
 
Top Bottom