Send PMs (automatically)
If you want to (automatically) send a PM to a user, you can use the Class vB_Datamanager_PM.
This class makes sure that all values are correct, handles quota for the recipients, notification eMails, etc. Example PHP Code:
PHP Code:
If everything is OK PHP Code:
Quote:
$botpermissions must be the permissions for the sending user, but can just be empty. If you want to send PMs no matter if the PM box of the recipient is full or not: PHP Code:
Furthermore you can specify ($pmdm->set(...)):
For multiple receipients just use user1;user2;useer3. This How-To is (C) 2005 by KirbyDE and you are not allowed to redistribute it in any way without my explicit consent. |
This is a FANTASTIC tutorial - people can make up a zillion hacks based on this How-To. :)
|
KirbyDE, That is great! I just love this.
Finaly the old vB.org is BACK! |
Wow! Lots of good stuff here. I'm so excited about this new release. Thank you so much for the tutorial, as it really does teach you something useful. Thanks!
|
Kirby,
Is there anyway we can get this info for the other classes? |
Quote:
|
To send PMs to more than 1 user:
Retrieving usernames: To get a list of usernames from an array and output in the form of user1;user2;user3: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
The PM data manager seems to completely kill the page when I use this function. It just does a white page and no PM is sent.
PHP Code:
|
Quote:
|
Code:
$pmdm->set_recipients('newuser', $botpermissions); |
All times are GMT. The time now is 01:24 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:
|