Post notices (staff notices)

In Discourse 2.3.0.beta4 we added a special call-out notice for new/returning users. Staff can now add custom call-outs above posts, which appear similar to the new user first post call-out. In latest Discourse, we made it so you can also use Markdown.

This notes can be added from the :wrench: button (post admin actions) and :shield: Add Staff Notice.

34 Likes

Hi @dan,

If a post has a new/returning user notice, a staff notice can’t be added.

When I click the wrench to add a staff notice on a post that has a new-user notice, I see only ā€œRemove Staff Noticeā€.

Is this intentional - or would it be possible for posts to have more than one kind of notice at a time?

5 Likes

Not at the moment, I suggest removing that post notice and adding the alternate post notice as needed.

4 Likes

Here’s an example of it in action.

3 Likes

Could we have an option to edit a staff notice? We now have to remove it and rewrite it again. It will save us some clicks… :yum:

7 Likes

Hi @dan @team how are you? Is there a way to view all staff notices? Thank you!

1 Like

You can use the Data Explorer plugin and run this query to view all staff notices:

SELECT post_id, value::json->>'raw'
FROM post_custom_fields
WHERE name = 'notice' AND value::json->>'type' = 'custom'
7 Likes

Thank you! I wasn’t able to find the custom field but I’ll check it out now :slight_smile:

Yes! It worked and thank you for the json because it wasn’t going to be easy to filter the ā€˜custom’ notices

1 Like

Is it possible to change the icon used on Staff Notices, either through css or a setting that I just haven’t found? Preferably we’d like to swap it out for a custom picture rather than a FA icon.

1 Like

We do not have a setting for that and I think doing it in CSS only is difficult, but you can create a theme component to replace it.

In CSS, you will hide the old icon:

.post-notice {
  .d-icon-user-shield {
    display: none;
  }
}

In JavaScript (you put this in <head> of the theme component), you will decorate the notice and add the new icon:

<script type="text/discourse-plugin" version="0.8">
  const { iconNode } = require("discourse-common/lib/icon-library");
  api.decorateWidget('post-notice:before', helper => {
    return iconNode('heart');
  });
</script>

… or if you want to replace with an image…:

<script type="text/discourse-plugin" version="0.8">
  api.decorateWidget('post-notice:before', helper => {
    return helper.h('img', {
      src: 'https://www.discourse.org/a/img/home-spot-1.png',
      style: 'margin-right: 0.65em',
      height: 30,
      width: 30
    });
  });
</script>

With themes and theme components, the sky is the limit. If you want to learn more, we have a resource for that:

11 Likes

We were a bit surprised to find that TL4’s can add ā€œStaff noticesā€. Since TL4 are not considered Staff, is this intended?

Obviously TL4 are manually assigned and there’s some trust involved. But this notices even appear identified with the moderator shield next to them. Trusting TL4 to help run the forum is different from having them speaking for the forum Staff?

1 Like

I find them quite useful as. TL4 on another site I’m on, though I obviously stick within the guidelines set out by the moderator. :slightly_smiling_face:

As you have manually promoted these trusted users to TL4, could you also simply set some guidelines as to when would be an appropriate time to use them?

I think you can keep an eye on the activity in your staff logs by filtering for ā€˜add staff note’, if that helps?

1 Like

A post was split to a new topic: Staff notices positioning is ambiguous