Advertisement:

Author Topic: Extarnal PM function  (Read 2783 times)

Offline Geekologist

  • Newbie
  • *
  • Posts: 6
Extarnal PM function
« on: June 18, 2017, 01:04:19 PM »
My external site has access to SMF db so creating a function which does a action in the SMF db isn't a problem.

I do not understand how the PM setup is working, I tried creating a function which sends a PM, but didn't work.. Not sure how it all hangs together.. Anyone able to give me an example maybe?

As far I can tell, there is 2 db tables belonging to the PM system, but how do they relate, which id goes where?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 69,326
    • StoryBB/StoryBB on GitHub
Re: Extarnal PM function
« Reply #1 on: June 18, 2017, 01:21:58 PM »
You don't touch the tables directly. Call the sendpm function in Subs-Post.php to do it for you.
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 Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,110
  • Gender: Male
    • Kindred-999 on GitHub
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Geekologist

  • Newbie
  • *
  • Posts: 6
Re: Extarnal PM function
« Reply #3 on: June 18, 2017, 01:55:19 PM »
@Arantor, thanks for your reply, should be able to use that function. And just to note, I'm not trying to spy on members PM, but we have a external system which needs to send the member a PM with information.

@Kindred, thanks. That was very helpful  :)