Advertisement:

Author Topic: Extarnal PM function  (Read 1913 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: 68,061
    • Arantor 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,122
  • 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  :)