[How-To] Use API for Private Messages
Have you ever wanted to create a hack that'll private message users when they reach a certain point in the script?
For instance say you wanted to private message user "abc" when he or she reaches the end of the form. The first thing you'll need to do is require "includes/class_dm.php" along with "global.php". I have put the Private Message API into a function. I decided to do this in my own script due to the repetiveness. PHP Code:
Let's say you owned a auction type forum and wanted to private message an user after they've entered their product's information into the form. PHP Code:
PHP Code:
|
I believe this article was already posted.
|
I searched for "private message api" and only my thread came up.
|
<a href="https://vborg.vbsupport.ru/showthread.php?t=82786" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=82786</a>
From over a year ago. It is listed in the summary of How To's that is stickied in this forum. |
Well that sucks, well I explain another approach to do it.
|
No, thankyou!
I dont know how, but you solved my Pm Counters not updating problem! When no-one else wanted to answer it! Thanks a ton! ~Cody Woolaver |
Quote:
Honestly I don't know where it would update the counters. Perhaps the 'save()' function? I'm glad you found my tutorial useful. |
nope, i had a save ^^; its actchually still puzzling, because all you had wa puting it in a function, and adding return and unset.... which shouldent have made any differance! but, whats with the global at the top? i never had that...
(my guess is that its because it is in a function) |
No need to return a value.
PHP Code:
|
Quote:
If I haven't have globalized those two the API would be rendered useless. Quote:
It's been a while but I think I tried to use the function without returning the value and it didn't work. I could be wrong though. |
All times are GMT. The time now is 01:33 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|