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

Make Staff Replies In Certain Board Colored?

Discussion in 'XenForo Development Discussions' started by Sir nick, Feb 8, 2011.

  1. Sir nick

    Sir nick Well-Known Member


    I'm interested in making replies in my support board a different color. Like a like brown. Anyone know of a way to do this?
  2. EQnoble

    EQnoble Well-Known Member

    Not in detail or the actual means but you would need to think along the lines of if user is a certain user group and post submitted then use "x" styling option which would probably need you to make you own styling markup for it in EXTRA.css. I haven't thought of or tried this so I can't offer you a method or even guarantee that something like what I said would work. But it is a place for you to start investigating at least
  3. Brogan

    Brogan XenForo Moderator Staff Member

    There is actually a staff class which is currently unused so you can create your own css for that.


    Just add it to EXTRA.css and that should achieve what you want.
    Wired, EQnoble, Nasr and 1 other person like this.
  4. Trombones13

    Trombones13 Well-Known Member

    I see Ryan's already done this on Postloop with a special .staff CSS class, but I'm not sure of the exact implementation...just thought I'd let you know it's been done. :)

    EDIT: ...yeah; it's what Brogan said. haha
  5. EQnoble

    EQnoble Well-Known Member

    Really...just like that huh....well color me stupid. I though this would have taken a lot. Just add some css and your cooking with gas. Nice.
  6. James

    James Well-Known Member

    If you wanna utilise the staff class, just do something like:
    {xen:if {$thread.node_id} == x, 'staff'}

    Stick that code in your li: <li class="someClass {xen:if {$thread.node_id} == x, 'staff'}">

    Job done.
    Brogan and EQnoble like this.
  7. Brogan

    Brogan XenForo Moderator Staff Member

    D'oh! facepalm.gif

    I missed the bit about it being in a specific forum.

    I blame the fermented grape juice...
    EQnoble and James like this.
  8. James

    James Well-Known Member

    Just been looking, in the message template is the following code:
    <li id="{$messageId}" class="message {xen:if $message.isDeleted, 'deleted'} {xen:if '{$message.is_admin} OR {$message.is_moderator}', 'staff'}" data-author="{$message.username}">
    As you can see, the staff check is done here:
    {xen:if '{$message.is_admin} OR {$message.is_moderator}', 'staff'}"
    I've not ran a check but if you dump the $message variable (probably should wrap it in a conditional or your PHP will probably run out of memory dumping it for every message) you should be able to use $message.node_id.
  9. Sir nick

    Sir nick Well-Known Member

    It would only be used for the admin group. :). Just trying to figure it out because I'd like to show staff replies.
  10. James

    James Well-Known Member

    Remove the is_moderator check so it's only is_admin, then apply styling to the staff class.
  11. Mikey

    Mikey Well-Known Member

    Sir nick, EQnoble and Trombones13 like this.

Share This Page