optrex

Customer
I would like to be able to post "admin posts" and have them highlighted as such, but keep them separate to personal posts. I've created a new account but the tab appears for all admin accounts. How can I turn it on/off on a per admin account level please?
 

Russ

Pixel Exit Staff
Not entirely sure I understand. By default XF has a .staff class added the message so you can use that to style it differently. Additionally we add .admin to specifically admin messages to style those differently.

Are you referring to little marker we have built into XenBase as an option?

Could you explain a little further, sorry if I missed it above.
 

optrex

Customer
Are you referring to little marker we have built into XenBase as an option?
Yes I think so. You have admin post and new admin post within XenBase.

The .admin class means it's attached to every post an administrator makes - even without permissions assigned. I'd like to be able to turn it on and off for individual admin accounts or just assign it to one specific account
 

Russ

Pixel Exit Staff
So not possible without a slight modification

Open the message template

Where you see this:

Code:
<li id="{$messageId}" class="message
Add something like this right after:
Code:
<li id="{$messageId}" class="message <xen:if is="{$message.user_id} == 2">customMessage</xen:if>
This would add a class on the user id 2

Or multiple users:
Code:
<li id="{$messageId}" class="message <xen:if is="in_array({$message.user_id}, array(2, 3, 4))">customMessage</xen:if>
 

optrex

Customer
Hi Russ,

Thanks, that gave me what I needed. But I had to change a different part. Have noted below.
Code:
  <div class="messageInfo primaryContent">
        <xen:if is="@xb_adminPostIndicator">
            <xen:if is="{$message.isNew} AND !in_array({$message.user_id}, array(1, 2))"><strong class="newIndicator"><span></span>{xen:phrase new}</strong></xen:if>
                    <xen:if is="in_array({$message.user_id}, array(1, 2)) AND {$message.isNew}">
                        <strong class="adminPostIndicator"><span></span>@xb_newAdminPost_phrase</strong>
                    </xen:if>
                  
                    <xen:if is="in_array({$message.user_id}, array(1, 2)) AND !{$message.isNew}">
                        <strong class="adminPostIndicator"><span></span>@xb_adminPost_phrase</strong>
                    </xen:if>
 

twisted_pepper

Registered
I would like to be able to post "admin posts" and have them highlighted as such, but keep them separate to personal posts. I've created a new account but the tab appears for all admin accounts. How can I turn it on/off on a per admin account level please?
I too wondered about this. Excellent. :)
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.