Mod Post?

Discussion in 'General Discussion' started by Jadster, Jan 22, 2017.

  1. Jadster

    Jadster Customer

    Hello @Russ or @Steve,
    I noticed I can add the "Admin Post" feature on my posts and for other admins, but I wanted to ask, can I do the same for Moderators but change theirs from red to green?

    If so, how would I go about doing this?
     
  2. Steve

    Steve Designer

    You could with a template edit and a conditional. Are you going to be using the Admin Post indicator as well?
     
  3. Jadster

    Jadster Customer

    Yes I plan on using both the Admin Post as well as the Mod Post.
     
  4. Steve

    Steve Designer

    Okay

    So open up the message template

    Find:
    Code:
    Copy Source
    <xen:if is="{$message.is_admin}">
                                <strong class="newIndicator adminPostIndicator"><span></span><xen:if is="{$message.isNew}">@xb_newAdminPost_phrase<xen:else />@xb_adminPost_phrase</xen:if></strong>
                            </xen:if>
    Below it add:
    Code:
    Copy Source
    <xen:if is="{$message.is_moderator}">
                                <strong class="newIndicator modPostIndicator {xen:if $message.is_admin, 'adminPostIndicator',''}"><span></span><xen:if is="{$message.isNew}">New Mod Post<xen:else />Mod Post</xen:if></strong>
                            </xen:if>
    Change the bits in blue (the phrases) to whatever you want.

    Then add this to EXTRA.css
    Code:
    Copy Source
    .XenBase .modPostIndicator.adminPostIndicator {
            display: none;
    }
    .XenBase .newIndicator.modPostIndicator {
            color: #234a71;
            background: #d7edfc;
            border: 1px solid #a5cae4;
    }
    It will inherit most of the styling from the other indicators but you will need to adjust it from what I have there.

    Let me know how that works :)
     
  5. Jadster

    Jadster Customer

    It worked after I removed the "display: none;".
    That code just kept hiding it.
     
  6. Steve

    Steve Designer

    I wouldn't suggest showing both Admin/Mod in the same post. If the user is a Mod it will show, if the user is an Admin & Mod (you're most likely set as an Moderator too) it only shows the Admin indicator.
     
    Last edited: Jan 22, 2017
  7. Jadster

    Jadster Customer

    Oh gotcha! I didn't piece that together!
     
  8. Steve

    Steve Designer

Let's work together on your next project

Contact us today to talk about how we can help you

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.