The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
PM or email a user, with a post quoted Ver. 1.3 Details »» | |||||||||||||||||||||||||||
PM or email a user, with a post quoted Ver. 1.3
Developer Last Online: Mar 2022
Well, this one was born, when I wanted to PM a user, and quoted a post he had made in my forums, in the PM.
Well, I could copy and paste, and then insert the quote tags, but instead, I did some code tweaking and here you go. This hack will create a new menu item, in the drop-down menu which is shown when you click on a user's name in the postbit. When you click on that menu item, you will be taken to the PM form, with the Recipient field, filled with the poster, the title field filled with the original thread's title and in the message box, you will have the text of the post as a quote. Also, it will add a small icon, in the first postbit line, which when clicked will redirect you to the new PM form, with only the text from the selected post, quoted. You are now free to enter any recipients you want. Thanks to Amykhar for this, more generic version. Remember to save the third image below in your disk and then upload it in the images/buttons directory in your server. Easy mod, just two edits. Version 1.0 Initial version with only PM functionality, called from the user drop-down menu and sending the PM to the user who posted the post. Version 1.1 More generic version, which allowed to send a PM with a quote of a post, to any member of your forums, via the small icon on the top of each postbit. Version 1.2 This version added the same functionality as the one described above, but using an email instead of a PM. Users who want to upgrade, just scroll down in the installation instructions, until you find the section dealing with the email. Remember to save the fourth image below in your disk and then upload it in the images/buttons directory in your server, if you want to use the email functionality. Version 1.3 (current) One thing I didn't like about the way this hack worked, was that upon sending the PM or the email, it didn't return you to the post you were, when you started it. So I did some small changes to implement that functionality. Now, after the PM or the email is send, you are returned to the post you were before. For a new installation, just follow the instructions in the txt file. For upgrading here is what you have to do: 1. Open your private.php file and find: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
HTML Code:
<input type="hidden" name="receipt" value="0" />
HTML Code:
<input type="hidden" name="return_url" value="$return_url" />
Open file sendmessage.php and find: PHP Code:
PHP Code:
I hope you like it. Show Your Support
|
Comments |
#2
|
||||
|
||||
Nicely done. Hopefully, I won't confuse anybody with what I'm about to share, because his hack works perfectly as described. But, I wanted a wee bit more. I wanted to be able to quote a post in a private message to ANY member, not just the author of the post.
To do this, I had to move his code snippet as follows: In his directions, he said: Code:
Open file private.php and find the first occurence of: if (empty($recipients)) { $pm['recipients'] = ''; } else { $pm['recipients'] = implode('; ', $recipients); } Below that, add: Code:
Find: // insert username(s) of specified recipients if ($_REQUEST['userid']) Above that add: Then, in the postbit or postbit legacy templates, in addition to the edit he suggested, Find: Code:
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]"> <img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /> </a> </if> Code:
<if condition="$show['pmlink']"> <a href="private.php?$session[sessionurl]do=newpm&postid=$post[postid]&userid="> <img class="inlineimg" src="$stylevar[imgdir_misc]/pmquote.gif" alt="Quote post in private message" border="0" /></a> </if> |
#3
|
|||
|
|||
Why don't you just delete the preselected recipient and add the recipients you want, to the PM form which will open?
You may even remove the part of the code which adds the "Re. your post in thread: this and that" and the "In your post, you wrote:" and have a more generic version. |
#4
|
||||
|
||||
True. That would work for me. But, sometimes users aren't that sophisticated.
|
#5
|
|||
|
|||
OK, here is the second version, which adds your functionality as well. The only thing it retains from the original post, is the quoted text.
If one uses the menu selection, all three fields get filled up as before. Rgds |
#6
|
|||
|
|||
Worked like a charm.
Thanks. |
#7
|
||||
|
||||
Nice hack man! How do I add that admin cp edit user conditional in there?
|
#8
|
|||
|
|||
Quote:
HTML Code:
<if condition="$post['userid']"> <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr> HTML Code:
<if condition="$bbuserinfo['usergroupid']=='6'"> <tr><td class="vbmenu_option"><span onmouseover="this.style.cursor='pointer';" onClick="window.open('admincp/user.php?do=edit&userid=$post[userid]','edit','width=1024,height=350,scrollbars=yes')"><b>AdminCP Edit $post[username]</b></span></td></tr> </if> |
#9
|
||||
|
||||
Nice hack, I could have used that alot in the past. It would be nice having that here for the service requests forum.
|
#10
|
||||
|
||||
In your postbit template (or postbit_legacy).
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|