Advertisement:

Author Topic: leveraging 'integrate_personal_message' for notifications of events  (Read 658 times)

Offline drewactual

  • Full Member
  • ***
  • Posts: 672
    • College Football Fan Site CFB51
akin to an 'alert' package, but without using added js functions or templates... I would like to learn, if someone would be so kind, how to integrate the function to make users aware of when/where/who they were quoted, as a for instance, by sending them a PM. 

i'm going to use it for use on chopping up a couple other premium functions, but i really want to abandon the alerts package (that ajax's notices into it's own area/call and by using vendor provided js)... my end game is I not only want the ability to send a PM as a result of the event, but be able to poll the database with a separate query and leveraging the stats to send intro's to the most popular thread/topic for the described period, but also what interactions with their own posts they may have missed and/or notices of comments on threads they'd participated with in the past- the wildcard being selecting which members (inactive for x number of days) to send them to. 

am i out or bounds to consider leveraging integrate_personal_message?  any guidance would be appreciated!!!!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,383
    • StoryBB/StoryBB on GitHub
This is literally the opposite of how hooks work.

A hook is a piece of code run at a given time, essentially saying “hey folks, I’m here at this point, anybody want me to do anything?” In the case you’re talking about, that’s during the processing of PMs, not processing to make new ones.

You’d need to add a whole bunch of code instead to each of the other areas where things happen to be able to send PM alerts.

Most practical approach is easier to continue using the mod you’re using, or upgrade to 2.1 which has an alerts system built in, but I designed and implemented a lot of its internals so it’s probably a stupid hot mess (like, apparently, the likes system that was so dire after I wrote it in 2.1 that it got a rewrite)
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 drewactual

  • Full Member
  • ***
  • Posts: 672
    • College Football Fan Site CFB51
thanks for the heads up, Arantor.