Staff Post Indicator [Deleted]

Russ

Well-known member
Russ submitted a new resource:

Staff Post Indicator (version 1.0) - Gives "New Post" function for all staff posts"

This is a rather simple template modification which simply extends the "New Post Indicator" to display it on all admin posts. Like so:

View attachment 32902

Steps to install:

Open EXTRA.CSS and add:

Code:
    .message .snewIndicator
    {
        font-size: 11px;
        color: @primaryMedium;
        background: @primaryLight url('@imagePath/xenforo/gradients/form-button-white-25px.png') repeat-x top;
        padding: 1px 5px;
        margin: -5px -5px 5px 5px;
        border:...

Read more about this resource...
 
This is awesome Russ:)

As someone who likes to keep the postbit as clean as possible around the avatar area, this is perfect for having a mod/admin indicator on the post, without a permanent marker in the avatar region.

Can you the admin label change to reflect moderator posts too by using $message.is_mod with a matching class?
 
This is awesome Russ:)

As someone who likes to keep the postbit as clean as possible around the avatar area, this is perfect for having a mod/admin indicator on the post, without a permanent marker in the avatar region.

Can you the admin label change to reflect moderator posts too by using $message.is_mod with a matching class?

Would you want admins to have they're own label and mods to have theirs too such as "Mod New Post"

EDIT:

Try this for the replacement of that code instead:

Code:
        <xen:if is="{$message.isNew} AND !{$message.is_admin} OR !{$message.is_moderator}"><strong class="newIndicator"><span></span>{xen:phrase new}</strong></xen:if>
<xen:if is="{$message.is_admin} AND {$message.isNew}">
<strong class="snewIndicator"><span></span>New Admin Post</strong>
</xen:if>
<xen:if is="{$message.is_admin} AND !{$message.isNew}">
<strong class="snewIndicator"><span></span>Admin Post</strong>
</xen:if>
<xen:if is="{$message.is_moderator} AND {$message.isNew}">
<strong class="snewIndicator"><span></span>New Mod Post</strong>
</xen:if>
<xen:if is="{$message.is_moderator} AND !{$message.isNew}">
<strong class="snewIndicator"><span></span>Mod Post</strong>
</xen:if>

If you wanted to style moderators label differently simply change the class name on the moderator conditionals "snewIndicator" to like "mnewIndicator", copy and paste the existing CSS code and change the css accordingly.
 
That's brilliant Russ, thanks,

I edited that slightly to the following so that if a user is and admin and a mod it will only display the admin tag.

Code:
<xen:if is="{$message.isNew} AND !{$message.is_admin}"><strong class="newIndicator"><span></span>{xen:phrase new}</strong></xen:if>
<xen:if is="{$message.is_admin} AND {$message.isNew}">
<strong class="adminNewIndicator"><span></span>New Admin Post</strong>
</xen:if>
<xen:if is="{$message.is_admin} AND !{$message.isNew}">
<strong class="adminNewIndicator"><span></span>Admin Post</strong>
</xen:if>
 
<xen:if is="{$message.is_moderator} AND !{$message.is_admin} AND {$message.isNew}">
<strong class="modnewIndicator"><span></span>New Mod Post</strong>
</xen:if>
<xen:if is="{$message.is_moderator} AND !{$message.is_admin} AND !{$message.isNew}">
<strong class="modNewIndicator"><span></span>Mod Post</strong>
</xen:if>

mod admin.webp

Do you know how I could alter criteria so that it will check if a user is a mod in the forum the post is being made in?

So if the mod is posting in a forum they moderate, the marker will appear. But if it's another forum there will be no marker.

So something along the lines of this, but I'm not sure what the right criteria is:

Code:
<xen:if is="{$moderator.is_modOfThisNode} AND !{$message.is_admin} AND {$message.isNew}">
<strong class="modnewIndicator"><span></span>New Mod Post</strong>
</xen:if>
 
That's brilliant Russ, thanks,



Do you know how I could alter criteria so that it will check if a user is a mod in the forum the post is being made in?

So if the mod is posting in a forum they moderate, the marker will appear. But if it's another forum there will be no marker.

So something along the lines of this, but I'm not sure what the right criteria is:

Code:
<xen:if is="{$moderator.is_modOfThisNode} AND !{$message.is_admin} AND {$message.isNew}">
<strong class="modnewIndicator"><span></span>New Mod Post</strong>
</xen:if>


I don't think the default conditionals can do this but you can check out:

http://xenforo.com/community/threads/check-if-a-user-can-moderate-forum.26596/

Looks like he came up with a mod and a conditional to help. I'd have to toy with it for a bit however I'm off to work.
 
Is there a way to check for a specific user group? I admin a forum for an indie game but would like to highlight on developer posts and not admins. So for example user group with an id of 7
 

Just in case you needed help with it still this should work for you (y)
Code:
<xen:if is="{$message.isNew} AND !{xen:helper ismemberof, $message, 7}"><strong class="newIndicator"><span></span>{xen:phrase new}</strong></xen:if>
<xen:if is="{xen:helper ismemberof, $message, 7} AND {$message.isNew}">
<strong class="snewIndicator"><span></span>New Dev Post</strong>
</xen:if>
<xen:if is="{xen:helper ismemberof, $message, 7} AND !{$message.isNew}">
<strong class="snewIndicator"><span></span>Dev Post</strong>
</xen:if>
 
Just in case you needed help with it still this should work for you (y)
Code:
<xen:if is="{$message.isNew} AND !{xen:helper ismemberof, $message, 7}"><strong class="newIndicator"><span></span>{xen:phrase new}</strong></xen:if>
<xen:if is="{xen:helper ismemberof, $message, 7} AND {$message.isNew}">
<strong class="snewIndicator"><span></span>New Dev Post</strong>
</xen:if>
<xen:if is="{xen:helper ismemberof, $message, 7} AND !{$message.isNew}">
<strong class="snewIndicator"><span></span>Dev Post</strong>
</xen:if>
Worked perfectly. Thanks a lot :)
 
For ...
Code:
<strong class="snewIndicator"><span></span>Dev Post</strong>

Add a class such as .devIndicator
Code:
<strong class="snewIndicator devIndicator"><span></span>Dev Post</strong>

Then in Extra.css add the .devIndicator class and specify something like
background: url('img_url') no-repeat;

Something along those lines will let you customize the indicator.
 
I must be the only idiot with this problem but in the installation instructions it says to open EXTRA.CSS and I did that, but then it says to go into the Template Message and replace some additional code. My problem is what is the "Template Message"? There's no such .css file called Template Message.css or Template_Message.css that I could find.

Little clarification for the un-technically advanced please!
 
I must be the only idiot with this problem but in the installation instructions it says to open EXTRA.CSS and I did that, but then it says to go into the Template Message and replace so additional code. My problem is what is the "Template Message"? There's no such .css file called Template Message.css or Template_Message.css that I could find.

Little clarification for the un-technically advanced please!
:)

There is a template called "message" not a css but a standard HTML template.
 
haha thanks. I told you I was dumb.

Alright now I read through this page and there is a lot of changes and modified versions and basically all sorts of different styles. So which one should I use? Should I use this one:
Code:
<xen:if is="{$message.isNew} AND !{xen:helper ismemberof, $message, 7}"><strong class="newIndicator"><span></span>{xen:phrase new}</strong></xen:if>
<xen:if is="{xen:helper ismemberof, $message, 7} AND {$message.isNew}">
<strong class="snewIndicator"><span></span>New Dev Post</strong>
</xen:if>
<xen:if is="{xen:helper ismemberof, $message, 7} AND !{$message.isNew}">
<strong class="snewIndicator"><span></span>Dev Post</strong>
</xen:if>
 
My description will tell you what my version does:

  1. If message is new and not an admin display "New"
  2. If message is from an admin and is new display "New Admin Post"
  3. If message is from an admin and is not new display "Admin Post"

Because of XF's great system in place you can do quite a few things with it as listed through the thread. But if you stick with strictly my edits... you'll get those results above.
 
Top Bottom