Advertisement:

Author Topic: createPost question  (Read 685 times)

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,704
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
createPost question
« on: April 23, 2019, 09:44:26 PM »
Using the function createPost, when assigning a member to a topic that's being created, how do you make it so that the member gets notifications of replies? I can't seem to find it in the documentation outlined here: https://support.simplemachines.org/function_db/index.php?action=view_function;id=323

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,519
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: createPost question
« Reply #1 on: April 23, 2019, 11:07:02 PM »
You won't be able to do it with that function, creating a post and get notifications for it are treated separately. The user needs to explicitly opt-in to get notifications.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,704
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: createPost question
« Reply #2 on: April 24, 2019, 09:06:26 AM »
You won't be able to do it with that function, creating a post and get notifications for it are treated separately. The user needs to explicitly opt-in to get notifications.

There isn't another function designed that opts them in automatically?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,392
    • StoryBB/StoryBB on GitHub
Re: createPost question
« Reply #3 on: April 24, 2019, 09:08:08 AM »
No because it is unethical and if in Europe, potentially illegal.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,704
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: createPost question
« Reply #4 on: April 24, 2019, 09:37:41 AM »
A simple "no" would suffice.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,392
    • StoryBB/StoryBB on GitHub
Re: createPost question
« Reply #5 on: April 24, 2019, 09:41:59 AM »
I considered it a reasonable expectation that you would challenge a simple no because you generally have the expectation (not unreasonably) of having detailed and thorough answers.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 5,157
  • Gender: Male
    • i30 Owners Club
Re: createPost question
« Reply #6 on: April 24, 2019, 12:15:15 PM »
While I agree with the notion that notifications should only ever be opt-in for all members, my "birthday topic" auto poster automatically subscribes the birthday boy/girl to that topic, such that he (or she) receives an email at the first reply.

I use a simple insertion into {smf_}log_notify to achieve it.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,430
  • Gender: Male
    • Kindred-999 on GitHub
Re: createPost question
« Reply #7 on: April 24, 2019, 02:54:39 PM »
and doing that would actually be illegal in the EU...  and is actually even questionable by CANSPAM standards.

(I know *I* would be annoyed, since I purposefully turn OFF all email post notifications on every forum I have ever joined - if an admin forced me to receive and email about posts I might be annoyed enough to report the site.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.