Preventing users from changing fonts/font size/colour?

GregF

Active member
Is there any way of adjusting settings to prevent members from changing fonts, font sizes & colours? As they can sometimes be a little too creative, which can make things a bit distracting sometimes...

Thanks,
Greg
 
I have to revisit this issue, as my code in the last post above...

.bbWrapper span {color: @xf-textColor !important;}

...also did not work, as it had unintended effects elsewhere. I disabled it last year, in fact.

And we're on XF 2.2 now.

So is there a way to target just the message body in posts and private conversations?

I see this as the HTML wrapping the message body:

HTML:
<div class="message-content js-messageContent">
     <div class="message-userContent lbContainer js-lbContainer " data-lb-id="post-222580" data-lb-caption-desc="MyUserID · Oct 10, 2021 at 11:41 AM">
          <article class="message-body js-selectToQuote">
               <div class="bbWrapper">This is a message body right here.</div>
               <div class="js-selectToQuoteEnd">&nbsp;</div>
          </article>
     </div>
</div>

Would it be as easy as referencing the article class? Or would it be safer to also include some of the class definitions from the outer HTML in the DIVs?

I can change colors in the browser "inspector" by manually changing the article class's color definition. But one thing I'm also running into in my testing is that colors encoded in the message body with <span style="color: blue"> are not affected. Posts prior to XenForo were made in phpBB, so those were originally entered in the post as bbcode like [COLOR=blue].

As I probably mentioned up-thread, I have the text color button removed, and I may also have found a way to disable manually entered bbcode, so new colored text is not being posted in the forum anymore.

So in essence, anything in the message body that is colored text should be forced to @xf-testColor.

Questions or comments? Put' em below. ⬇ Thanks!
 
Top Bottom