Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
How To Exclude Postbit Items From Showing In PM's
peterska2
Join Date: Oct 2003
Posts: 6,504

Manchester, UK
by peterska2 peterska2 is offline 19 Jun 2006

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:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

To hide the avatar in PM's we need to tell it to only display if this page is not part of the PM system.

To do this we need to make one change to the code. Changing the line
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

stops the avatar code from being processed in the PM pages.

The important part of this code is the
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This tells us that in addition to the previous condition it is also checking that the page is not private.php

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:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

You can exclude this by simply placing
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

before it and
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

after it.

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
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

which is telling us that it is NOT the private message, you need to tell it that it is the private message by using
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The Important Bit And Using This Technique With Other Files

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
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

This is taken from member.php which is the page for the profiles, but it is the same format on every page used in vBulletin, including most modification files.


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.
Views: 3626
Reply With Quote
Comments
  #2  
Old 21 Jun 2006, 00:48
G_Man's Avatar
G_Man G_Man is offline
 
Join Date: Feb 2006
Real name: Wade
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.
__________________
www.afterseppuku.com
Feel free to check it out and tell me what I can do better.
Make Money.
Reply With Quote
  #3  
Old 31 Dec 2006, 03:01
HPIA HPIA is offline
 
Join Date: Jul 2006
You are a genious. Where would my newb self be without you :love:
Reply With Quote
  #4  
Old 23 Dec 2007, 00:49
Soliloquy's Avatar
Soliloquy Soliloquy is offline
 
Join Date: Mar 2006
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:
Attached Images
File Type: gif gingerbread-stamp.gif (4.1 KB, 185 views)
Reply With Quote
  #5  
Old 23 Dec 2007, 01:09
valdet's Avatar
valdet valdet is offline
 
Join Date: Feb 2007
Real name: Valdet
This is another great resource. Thank you very much.
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
Show Thread Enhancements Showing Custom Profile Fields On Postbit And Postbit Legacy Attila M. vBulletin 3.6 Template Modifications 21 21 Jan 2013 19:47



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 05:25.

Layout Options | Width: Wide Color: