vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Pm Dm (https://vborg.vbsupport.ru/showthread.php?t=125490)

rogersnm 09-01-2006 09:35 AM

Pm Dm
 
2 Questions
a) Is what i have filled out so far right?
b) What should i put for what i have not filled out?

PHP Code:

    $subject "W"
    
$fromuser['userid'] = 'X';
    
$fromuser['username'] = 'Y';
    
$message "Z"
    
$pmdm =& datamanager_init('PM'$vbulletinERRTYPE_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

HTML Code:

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?
PHP Code:

    $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.

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 :)


All times are GMT. The time now is 02:43 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01062 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete