The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to create custom PM button?
First please excuse my very bad english
And now my problem. I want to add to user profile page PM button/link, if I click to this button, user received from me pre-configured private message. Can this possible? |
#2
|
|||
|
|||
You could do something like this:
Code:
<form action="private.php?do=insertpm" method="post" name="vbform"> <input type="hidden" name="recipients" value="$userinfo[username]" /> <input type="hidden" name="title" value="Preset Message Title" /> <input type="hidden" name="savecopy" value="1" /> <input type="hidden" name="message" value="This is a preset message I'm sending." /> <input type="hidden" name="s" value="$session[sessionhash]" /> <input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" /> <input type="hidden" name="do" value="insertpm" /> <input type="submit" value="Send"/> </form> And put it in the MEMBERINFO template where you want the button. But it will bring you to your private messages page when you press it. |
#3
|
|||
|
|||
Thank you, this script works very fine!
Only thing - the sent message not saved to my "Sent Items" folder. |
#4
|
|||
|
|||
Add
<input type="hidden" name="savecopy" value="1" /> to the form to save a copy to your "Sent Items" folder. |
#5
|
|||
|
|||
Thanks, it works.
Quote:
Template: Code:
<form action="private.php?do=insertpm&goto=apply_sub" method="post" name="vbform"> private.php: Code:
$vbulletin->url = 'private.php' . $vbulletin->session->vars['sessionurl_q']; if($_REQUEST['goto'] == 'apply_sub'){ header('Location: /adm/index.php'); exit; }else{ eval(print_standard_redirect('pm_messagesent')); } } } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|