Post notices for first-time and returning users

From community perspective is veeeeery useful Thanks for that

3 Likes

Just a quick comment… Post notice for first-time user is great, but I wonder why is it shown in PM? If the purpose is to get wider audience to welcome user, it should only be displayed in public topics… Posts in PM should be ignored when evaluating first post for a user if possible (haven’t seen the code so maybe it is impractical for implementation).

2 Likes

See @awesomerobot’s OP.

Everyone sees the post notice except for the new or returning user. If you wish to hide the notices globally or just in certain topics, please start at the first post and read down. Additional posts explain how to do this.

3 Likes

I don’t think you have understood my point.

I love displaying post notices because they help engagement.

The problem is that if first user’s post is in PM, first-time post notice is displayed there (and only recipient sees it).

Much better would be to ignore PMs for this purpose and display first-time post notice in first public post. Then it gets to much wider audience and first time poster gets welcome from many members.

4 Likes

The point is that some people think that even in a pm it’s useful to know if someone hasn’t posted in a long time, but if you think those messages are inappropriate for PMs then you can add css to hide them.

EDIT:

Oh! Sorry. So if they send a PM that counts as their first post in a long time, so their next public post isn’t counted as a first post in a long time. Sorry. I missed that too.

I see. It seems a bit like an edge case, but if I’m guessing at how the code works then it should be a fairly small tweak to not look at PMs when doing that how-long-it’s-been check.

4 Likes

Understand now. :wink:

1 Like

Thanks… if the change is not much hassle, then it would be really great!

For me it is not the edge case because I try to approach every member with personal welcome PM :slight_smile:

2 Likes

No, this won’t be happening, the current behavior is very intentional. Your other option is CSS modifications, which you can easily make yourself as @pfaffman noted.

2 Likes

Is it possible to send email to such users who post for the first time?? Like there’s this notice of a user posting for a first time. Is it possible that we can send him email for his first post?

2 Likes

You could send a PM (which would email them if they’re not onsite). What are you actually trying to achieve though?

4 Likes

Should this at least be changed for tutorial PM?

Not many new users start the tutorial as the very first thing (actually, not many do at all), but those who do have the new user notice posted inside a tutorial, where no one will ever see it.

8 Likes

That is an excellent point, we should prevent it in that case, I agree.

8 Likes

It’s not only the tutorials. Private messages in general shouldn’t be candidates to display this notice.

Example:

Our new forum is still very small and (following Discourse’s advice somewhere) we are welcoming every new user with a personal message. It is not unusual that the first post of a new user will be a reply to the lovely message we send them. :slight_smile: And their reply shows the “This is the first time…” notice. This is means that whenever they comment publicly for the first time, no notice will identify them as new contributors.

2 Likes

Maybe edit the welcome message with a notice, “Please do not reply to this message. No one will see this.”

1 Like

Hi Jeff,

Are there any plans for the new user notices not appearing in PMs. Will this be going forward?

Thanks

4 Likes

Is there a way to extend this feature a little and send a notification to a user (or group) if a First time or Returning notice has been posted?

We’ve got someone who wishes to be in the role of ‘welcoming committee’ but who doesn’t read every post on a large forum. It would be great to have it as a notification for them.

4 Likes

Answering my own question, here is a Data Explorer query to pull those users who have most recently done their first post:

-- [params]
-- date :start_date

SELECT u.id AS user_id, p.id AS post_id, p.created_at
FROM users u
JOIN user_stats us
ON u.id = us.user_id
JOIN posts p
ON u.id = p.user_id
WHERE p.created_at = us.first_post_created_at
AND us.first_post_created_at BETWEEN :start_date::date AND NOW()
ORDER BY us.first_post_created_at desc

This is a minor modification of this query by @tshenry:

It could be improved by having a set time which it looks back from, e.g. one week or one month - but this defeated me as I couldn’t work out how to get NOW() - 7 or the like to work.

Also, excluding PMs as per another of @tshenry’s queries would be awesome but as I’m a SQL newbie it would take me ages to work out how to do it.

6 Likes

I think you would want something like:

AND us.first_post_created_at > NOW() - INTERVAL '7 DAYS'

(postgresql date/time docs)

To exclude PMs, you need to join to the topics table (following the posts.topic_id foreign key) and check the archetype column. Add this before the WHERE clause:

JOIN topics t ON p.topic_id = t.id

…and this before the ORDER BY:

AND t.archetype = 'regular'
6 Likes

The post notices are actually stored in the post_custom_fields table, so you can get a more precise list of posts like this:

-- [params]
-- int :days_ago = 7

SELECT p.created_at,
       p.id AS post_id,
       p.user_id,
       pcf.value AS "notice type"
FROM post_custom_fields pcf
INNER JOIN posts p ON pcf.post_id = p.id
INNER JOIN topics t ON p.topic_id = t.id
WHERE pcf.name = 'notice_type'
  AND p.created_at > NOW() - INTERVAL ':days_ago days'
  AND t.archetype = 'regular'
ORDER BY p.created_at ASC
7 Likes

Absolutely brilliant! Thank you, that is so much better.

3 Likes