The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Private Message button in postbit footer Details »» | |||||||||||||||||||||||||||||
Private Message button in postbit footer
Developer Last Online: Sep 2013
This simple mod does what is says on the tin, it adds a PM button in the postbit footer using the vBulletin 4.0.2 css convention for mouseover buttons.
Note: This mod is NOT compatible with vBulletin 4.0.1 or earlier. It could be argued that this is a little superfluous as there is a PM link in the dropdown under the members name, but that link requires a "click>>>scroll>>>click" to get to where you want to be. If your members use the PM system a lot, then they may appreciate a "one click" option. There are... 1x addition to the postbit.css template 1x addition to the posbit (or postbit_legacy) template 2x images to upload INSTRUCTIONS: 1x addition to he posbit.css template Go to.. Styles & Templates>Stlye Manager>your skin>edit templates>CSS templates>postbit.css ---------------------------------------------------------------------- Find (search for "editpost"): HTML Code:
.postbitlegacy .postfoot .textcontrols a.editpost, .postbit .postfoot .textcontrols a.editpost, .eventbit .eventfoot .textcontrols a.editevent { background: url({vb:stylevar imgdir_button}/edit_40b.png) no-repeat transparent {vb:stylevar left} ; padding-{vb:stylevar left}: 20px; } .postbitlegacy .postfoot .textcontrols a.editpost:hover, .postbit .postfoot .textcontrols a.editpost:hover, .eventbit .eventfoot .textcontrols a.editevent:hover { background: url({vb:stylevar imgdir_button}/edit_40b-hover.png) no-repeat transparent {vb:stylevar left}; padding-{vb:stylevar left}: 20px; } HTML Code:
.postbitlegacy .postfoot .textcontrols a.pminpostbit, .postbit .postfoot .textcontrols a.pminpostbit { background: url({vb:stylevar imgdir_button}/pminpostbit_40b.png) no-repeat transparent {vb:stylevar left}; padding-{vb:stylevar left}: 20px; } .postbitlegacy .postfoot .textcontrols a.pminpostbit:hover, .postbit .postfoot .textcontrols a.pminpostbit:hover { background: url({vb:stylevar imgdir_button}/pminpostbit_40b-hover.png) no-repeat transparent {vb:stylevar left}; padding-{vb:stylevar left}: 20px; } Click "save". 1x addition to the posbit (or postbit_legacy) template: Go to.. Styles & Templates>Stlye Manager>your skin>edit templates>postbit templates>postbit ---------------------------------------------------------------------- Find (search for "editpost"): HTML Code:
<vb:if condition="$post['editlink']"> <a class="editpost" href="{vb:raw post.editlink}" name="vB::QuickEdit::{vb:raw post.postid}"><img src="{vb:raw vboptions.cleargifurl}" id="editimg_{vb:raw post.postid}" alt="{vb:rawphrase edit_delete_message}" /> {vb:rawphrase edit_post}</a> <span class="seperator"> </span> </vb:if> HTML Code:
<!-- ////////start PM button in postbit////// --> <vb:if condition="$show['pmlink']"><a class='pminpostbit' href="private.php?{vb:raw session.sessionurl}do=newpm&u={vb:raw post.userid}" rel="nofollow"><img src="{vb:raw vboptions.cleargifurl}" alt="{vb:rawphrase send_pm}" />PM</a><span class="seperator"> </span></vb:if> <!-- ////////end PM button in postbit////// --> Click "save". 2x images to upload: FTP into your forum/images/buttons dir and upload these two attached images: ---------------------------------------------------------------------- pminpostbit_40b.png pminpostbit_40b-hover.png ---------------------------------------------------------------------- That's it. Download Now
Show Your Support
|
Comments |
#52
|
||||
|
||||
Great little addition to my forums! Thanks a lot trilOByte !!
|
#53
|
|||
|
|||
I installed it on my test forum (4.2) and put the code into my postbit-legacy and works fine.
|
#54
|
|||
|
|||
Just installed on 4.2.0 P3 and it works fine.
|
#55
|
|||
|
|||
works fine on 4.2.0 - thanks
|
#56
|
|||
|
|||
The images are not showing in my forum for some reason. Any ideas??
|
#57
|
||||
|
||||
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>'; } 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 */ 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. |
#58
|
||||
|
||||
Sure it could, I did it in a mod before.
|
#59
|
|||
|
|||
Works great in 4.2.1 except the hover box won't appear. Here's what's in the postbit legacy:
<!-- ////////start PM button in postbit////// --> <vb:if condition="$show['pmlink']"><a class='pminpostbit' href="private.php?{vb:raw session.sessionurl}do=newpm&u={vb:raw post.userid}" rel="nofollow"><img src="{vb:raw vboptions.cleargifurl}" alt="{vb:rawphrase send_pm} To {vb:raw post.username}" />PM</a><span class="seperator"> </span></vb:if> <!-- ////////end PM button in postbit////// --> Any ideas what could be wrong? |
#60
|
|||
|
|||
Great mod!
Works fine with vB 4.2.2. I just have one question: the PM link is also displayed under a private message, how do I remove it there? |
#61
|
|||
|
|||
Quote:
The hover is set in the postbit.css template, are you sure you added the code discribed in the instructions above? |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|