MyBB Community Forums

Full Version: Private message redirect to /private.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello.
When i send a PM to a user I'm redirected automatically to mysite.com/private.php. 
How can i do to show me a message on mysite.com/private.php like: "Private message sent to USER" ?

is there a plugin or a php code to edit the file private.php ?

Thank you !

This is what i mean:

// Now let the pm handler do all the hard work.
 if(!$pmhandler->validate_pm())
 {
 $pm_errors = $pmhandler->get_friendly_errors();
 $send_errors = inline_error($pm_errors);
 $mybb->input['action'] = "send";
 }
 else
 {
 $pminfo = $pmhandler->insert_pm();
 $plugins->run_hooks("private_do_send_end");

 if(isset($pminfo['draftsaved']))
 {
 redirect("private.php", $lang->redirect_pmsaved);
 }
 else
 {
 redirect("private.php", $lang->redirect_pmsent);
 }
 }
}


redirect("private.php", $lang->redirect_pmsent);
How can i do to redirect and on private.php to get a message "You sent PM to username1" ?
AdminCP > Configuration > Languages > Edit Language Variables > private.lang.php > redirect_pmsent

You'll probably have to fiddle around with trying to capture the _POST info from the PM submission to get the recipient name.