Couldn't this be done by adding a Plugin? I added a plugin to add an "Add Friend" button to the same place in the postbit.
Edit:
I just found an easier way of doing this, without editing any templates, only the Additional.css, and Creating a new plugin.
Create a new plugin:
Product: vBulletin
Hook Location: postbit_display_complete
Title: send_pm_user (could be anything you want)
Execution Order: 5
Plugin PHP Code:
Code:
$postuserinfo = fetch_userinfo($post['userid'], 128);
{
$template_hook['postbit_controls'] .= '<span class="sendpm"><a href="private.php? ' . $vbulletin->session->vars['sessionurl'] . 'do=newpm&u=' . $post['userid'] . '">' . construct_phrase($vbphrase['send_pm'], $post['username']) . '<img class="pmimg2" alt="Send PM" src="images/site_icons/pm.png"></a><span class="seperator"></span></span>';
}
Change the code in
RED to the image location of the Send PM Image that you downloaded from the first post.
Add this to
Additional.css:
Code:
/* Add Send PM to Postbit - Begin */
.pmimg2{margin:-2px;}
.sendpm{position: absolute;right: 495px;}
/* Add Send PM to Postbit - End */
You may need to change the code in
RED to align the button correctly. Lower Number = Right, Bigger Number = Left.
I have an "Add Friend" button in my postbit, so I had to align my "Send PM" before that, so mine will probably be different then yours. Just mess around with the code in
RED to get the button exactly were you want it.
All Credit goes to the OP
trilOByte, I just figured out another way to implement
his addon.
Note: You must know that if you add this mod this way, all usergroups will be able to see the button, including Guests. If you only want to allow specific usergroups, then you will have to edit the "postbit" or "postbit_legacy" template(s) and add the code manually. If anyone needs the code for the template version, let me know and I will post my code I use on my forum.