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

Custom user preference for Quote Block Expand?

Isil`Zha

Active member
#1
Is there any way to turn this on/off through a custom user preference?

I have several users that don't want this feature on, and I'd really like to get rid of having an entire extra child style just for that. In the bb_code_tag_quote template, the bb_code.css section doesn't work with the custom user preferences.
 

Russ

Well-known member
#2
Pretty easy to do...

https://theadminzone.com/ has it setup for a user field


Screenshot_3.png
Screenshot_4.png

Then inside the message template you could do something like this towards the top above this snippet

Code:
<li id="{$messageId}"
Code:
<xen:if is="{$visitor.customFields.expandquotesauto.on} == 'on'">
<style>
.bbCodeQuote .quoteContainer .quoteExpand.quoteCut
{
   display: none;
}
html .bbCodeQuote .quoteContainer .quote
{
   max-height: none;
}

</style>
</xen:if>

Screenshot_5.png

You can word it however you like, or also apply the CSS in another manner, even adding just an extra class inside the <li then add the css to extra.css targeting messages only with that class.