Log in

View Full Version : Pm Dm


rogersnm
09-01-2006, 09:35 AM
2 Questions
a) Is what i have filled out so far right?
b) What should i put for what i have not filled out?

$subject = "W"
$fromuser['userid'] = 'X';
$fromuser['username'] = 'Y';
$message = "Z"
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_SILENT);
$pmdm->set('fromuserid', $fromuser['userid']);
$pmdm->set('fromusername', $fromuser['username']);
$pmdm->set_info('receipt', false);
$pmdm->set_info('savecopy', false);
$pmdm->set('title', $subject);
$pmdm->set('message', $message);
$pmdm->set_recipients(WHAT DO I PUT HERE, AND HERE);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();

Corsec
09-01-2006, 07:01 PM
set_recipients (line 273)

Accepts a list of recipients names to create the touserarray field
boolean set_recipients (string $recipientlist, array &$permissions, [mixed $type = 'bcc'])

* array $permissions: array for sending user.
* string $recipientlist: Single user name, or semi-colon separated list of user names


Well, by the looks of this, the first arg should be a string of users to send the PM to. The second arg looks as if it should be an array for permissions, but not sure what would go in there. Hope this helps

rogersnm
09-01-2006, 07:03 PM
so if it was one user what would i put?
$pmdm->set_recipients('x', 'AND GOD ONLY KNOWS WHAT TO PUT HERE');

Paul M
09-01-2006, 07:23 PM
We have a nice forum full of "how to" Programming Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187).

This is one of them ;

https://vborg.vbsupport.ru/showthread.php?t=82786

rogersnm
09-04-2006, 09:09 AM
i searched but never saw, thanks :)