The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
How To Exclude Postbit Items From Showing In PM's
You know the situation, you have a modified board with lots of information in the postbit template, but you don't need any of it to be showing in PM's. But what can you do to stop it? This guide will show you how to prevent anything at all in the postbit template from appearing in PM's. IMO, the only thing that needs to be in the postbit for a PM is the username. Of course, everyone has different opinions on this, so I'm going to show you how to exclude different parts of the postbit from appearing in PM's. All the code snippets are taken from the postbit template, but will give you an idea on what to do with the postbit_legacy template. Part One: Excluding the Avatar The avatar section of the postbit template looks like this: Code:
<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> To do this we need to make one change to the code. Changing the line Code:
<if condition="$show['avatar']"> Code:
<if condition="$show[avatar] && THIS_SCRIPT!='private'"> The important part of this code is the Code:
&& THIS_SCRIPT!='private' The same format is used for every place that a current condition is used to display text. Part Two: Excluding the Post Count, Join Date, and other information In the default postbit template, there is a section of code that looks like this: Code:
<div class="smallfont"> <if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if> <if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if> <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if> <div> $vbphrase[posts]: $post[posts] </div> <if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if> <if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><div><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if> <div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div> </div> Code:
<if condition="THIS_SCRIPT!='private'"> Code:
</if> This code works for anywhere in the postbit where there is not already an if statement. Part Three: Including Information Only In PM's To include information only in PM's then you need to make a change to the condition used. Instead of using Code:
THIS_SCRIPT!='private' Code:
THIS_SCRIPT=='private' The main difference between including and excluding is this: != means is not == means is You can use this to show items on any page on your site depending on the template that you are editing. The part that comes after the != or == is the name of the page as defined in the php file. You can find this by opening the php file for the page that you are interested in and looking for the line that says Code:
define('THIS_SCRIPT', 'member'); Conclusion You have now learnt how to remove sections of the postbit template from PM's. Simply by following both steps above, you have left yourself with just the user name, user title, and user rank of the person how has sent the PM. Using the method in step one, you can also remove the user rank and user title. The same method can be used to remove the username, but why you would want to do that I don't know (it could be an interesting April Fools Trick though ). I hope that you have found this useful. If you have any questions about it, feel free to ask. |
#2
|
|||
|
|||
Great timing!!
I have a hack that isn't needed in PM's and was brought to my attention yesterday that it isn't working right either, so... Used your trick and voila!! Thanks for posting that. |
#3
|
|||
|
|||
You are a genious. Where would my newb self be without you :love:
|
#4
|
||||
|
||||
I've used this tutorial to take out the user information on the right and replace it with a "postage stamp". Here's the Christmas version:
|
#5
|
||||
|
||||
This is another great resource. Thank you very much.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|