Kallum's Action Replay Site

The Ultimate Action Replay Experience!


Post Reply
Forum Home > General Disscusion > programming help

Posts: 1311

I need someone's help. For my forum I need a html/script thing that starts and ends with <


What I want it to do: Send a user a private message if {LOCAL_URL} = their id. So on my forum, I can say something (bbcode) and it will send a privTe message to the users Id. I have this:



include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);

$message = utf8_normalize_nfc(request_var('message', '', true));
$uid = $bitfield = $options = ''; // will be modified by generate_text_for_storage
$allow_bbcode = $allow_smilies = $allow_urls = true;
generate_text_for_storage($message, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies);

$message = generate_text_for_display($message, $uid, $bitfield, $options);

$pm_data = array(
   'from_user_id'        => $user->data['2'],
   'from_user_ip'        => $user->data['24.1.109'],
   'from_username'        => $user->data['xFlare'],
   'enable_sig'            => true,
   'enable_bbcode'        => $allow_bbcode,
   'enable_smilies'        => $allow_smilies,
   'enable_urls'        => $allow_urls,
   'icon_id'            => 0,
   'bbcode_bitfield'    => $bitfield,
   'bbcode_uid'         => $uid,
   'message'            => $message,
   'address_list'        => array(' => array($moderators_to_pm[$i]['user_id'] => 'to')),

//Now We Have All Data Lets Send The PM!!
submit_pm('post', $user->lang['PM_TITLE'], $pm_data, true, false);


I am trying to use $USER->id to send the pm because it seems like my only hope. Brb


March 4, 2014 at 8:06 PM Flag Quote & Reply

Posts: 1311



those are the tokens for my forum. Tokens are placeholders for actual values.


March 4, 2014 at 8:09 PM Flag Quote & Reply

You must login to post.