PDA

View Full Version : Mini Mods - Profile Fields in Postbits


emin3m
11 Aug 2006, 00:52
Show Profile Fields in Postbits

Profile Fields in Postbits in german language (http://www.vbhacks-germany.org/showthread.php?t=6751)

Features
1. Shows Profile fields in the postbits.
2. Dosent shows if field is blank.
3. Admin can set which profile field to show and in which order.
4. Admin can set where to show under posts by user or under username NEW

Whats New
1. Queries issue fixed, now only 2 quries per page(showthread) load

Why Use it
As am running my university forums so, setting "roll no" (student-id-no) in postbit made easy to recognize ppl posting..
you can add fields like "Favourite music", "Favourite movie", "Favourite book" and add them in postbits..

REFERSH THE ADMIN PANEL AFTER INSTALLING IT

there might be such plugin b4 but am unable to find it,, is it?
for 3.5.x ..... here (http://www.vbulletin.org/forum/showthread.php?t=108344)
and on 3.6.0 special thanks to nicedreams (http://www.vbulletin.org/forum/member.php?u=73247)

Liked it?
How about https://www.vbulletin.org/forum/external/2010/02/12.gif (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=hasnat.ullah%40gmail%2ecom&item_name=Profile_Post_Bits&item_number=1&no_shipping=1&return=http%3a%2f%2fwww%2evbulletin%2eorg&cancel_return=http%3a%2f%2fwww%2evbulletin%2eorg&no_note=1&tax=0&currency_code=USD&bn=PP%2dDonationsBF&charset=UTF%2d8)

images
screen shot (http://www.vbulletin.org/forum/attachment.php?attachmentid=51940&stc=1&d=1163878741)
admin panel (http://www.vbulletin.org/forum/attachment.php?attachmentid=51941&stc=1&d=1163878741)

MustangLisa
11 Aug 2006, 01:07
Cool, thanks.

Hey, how did you get a smilie in the title postbit ... by the Super Moderator in your screen shot?

Jesus05uk
11 Aug 2006, 01:49
Very Nice - Installed on forums.gmodcentral.com

Galadrium
11 Aug 2006, 02:24
Thanks.

In the past this would have required a lot of editing and work.

-installed

StuntFactoryX
11 Aug 2006, 04:12
thanks and installed. this was 1 of the plugins that gave me errors when i upgraded to 3.6 and was using the old version. thanks for the updated 1.

Sal Collaziano
11 Aug 2006, 06:56
Cool. Thank you. :)

redlabour
11 Aug 2006, 07:08
Thx ! ;)

pauloo
11 Aug 2006, 09:55
Nice thanks !

Milad
11 Aug 2006, 17:14
I like it, but I don't like the queries.

You may optimize it.

Eagle Creek
12 Aug 2006, 16:49
This is so 100% EXACTLY what I'm looking for, for soo long!!

(does it work with postbit_legacy?)

WeArab
13 Aug 2006, 11:21
Cool thank you!

Installed!

I was searching for this add on long time ago!

Now I'm able to let the users show their mobile models, their Internet connections type!

You r0ck the VB world honestly!

The best of it, it doesn't need any modification!

Could you please optimize the queries?

bongwater
19 Aug 2006, 20:04
installed, thanks!

Troy Roberts
19 Aug 2006, 21:52
I like it, but I don't like the queries.

You may optimize it.

How many queries? Will this impact server overhead?

I really like the idea since it's a pain to do it all manually.

emin3m
21 Aug 2006, 21:04
@Milad
yea ill be optimizing it

@MustangLisa
its by adding user rank from adminpanel

@Eagle Creek
yes it works on postbit_legacy

Bad Bunny
23 Aug 2006, 15:53
How would I go about moving their position within the postbit? I can't see to find the added code...

dirtycrow
24 Aug 2006, 14:06
it's not showing up in my admin cp, even after a refresh and and a log out and log back in

*edit, nevermind ;)

works great!

adwade
26 Aug 2006, 05:38
I couldn't find it either! ha, ha I kept looking down at the bottom of the admincp, not up toward the TOP of the list!

Anyway, S-W-E-E-T modification :D sure to become one of my favorites. Kudos on a job well done emin3m!

Shazz
26 Aug 2006, 06:31
Peterska came up with a nice way too that works on any version..-(Not just the 3.6 and its just a code)

adwade
26 Aug 2006, 16:02
Peterska came up with a nice way too...
Thanxx. I looked it up, but I like this one better since it's so easy to turn different fields on/off anytime you want to.

ukcobra
27 Aug 2006, 10:14
As a new migrant to 3.6 from 3.08 I'm trying to find my way round the new features.

My Custom Profile fields have gone missing and this modification looks like it would solve it, however, how does it install ?

I can see the What it does and Why, just can't see the How you install it.

Can someone explain please or point me in the right direction.

Thanks

Mark

emin3m
27 Aug 2006, 16:22
@ukcobra
http://www.vbulletin.org/forum/showthread.php?t=82621

@adwade
thanks a lot

i sure will be updating this plugin + optimizing quries

ukcobra
27 Aug 2006, 16:58
Thanks for the pointer, installed, modified and working in under 5 minutes. This is a great help.

marlita
29 Aug 2006, 04:29
My checkbox values are showing up as number in my postbit. Do you know how to solve this? Here (http://www.vbulletin.org/forum/showpost.php?p=1054163&postcount=35) is a link to someone in another post who's having a similar problem. Granted, his is showing pics for another mod, but it's the same outcome for me with your mod. Thanks.

robertwo
30 Aug 2006, 16:23
There's a post here about that:

http://www.vbulletin.com/forum/showthread.php?t=97400

soletrader
30 Aug 2006, 17:02
I cant locate it in my admin cp.. where is it?

Farcaster
30 Aug 2006, 18:27
This plugin adds a lot of queries. If I add the profile fields to the postbit manually, no queries are added, because all of the fields are already joined on each post. However, if I use this plugin, a thread with 13 posts goes from 10 queries to 140! That's quite a lot of extra load for the database for bringing up a single page with 4 extra profile fields.

Looking at the code, it looks like the problem is that you are doing a separate query for each profile field and for each post, thus the extra queries needed become exponential for the number of posts per page and the number of profile fields. Since the fields are already loaded and available, you might see if you can use them instead of querying for them separately.

Hope that helps.

marlita
30 Aug 2006, 22:40
There's a post here about that:

http://www.vbulletin.com/forum/showthread.php?t=97400

Thank you for the link, but I didn't see any clearcut solution. If anyone can help with this some more, i'd appreciate it. Thanks.

Wired1
31 Aug 2006, 21:36
Thank you for the link, but I didn't see any clearcut solution. If anyone can help with this some more, i'd appreciate it. Thanks.

Here's some more info:

http://www.vbulletin.com/forum/showthread.php?t=108785

hsv z clubbie
01 Sep 2006, 04:09
This is exactly what I have been looking for, only new to vb and I cant get it installed. Any tips ?

Cheers

Edit:
Sorted it, excellent stuff, thanks !!!

Its running on http://www.eastcoastutes.com

WeArab
06 Sep 2006, 19:29
Hello emin3m,

Again it's nice hack, But!

When will you fix the lot of queries issue?

Dufachi
08 Sep 2006, 08:26
Once the queries issue is fixed, I'll definitely install this.

WeArab
12 Sep 2006, 08:26
I have disabled it in my forum till queries issue is fixed, now it kills my box MySQL server.

adwade
09 Oct 2006, 15:38
This plugin adds a lot of queries. If I add the profile fields to the postbit manually, no queries are added

Farcaster, for someone who's not in the know about such things how is this done? Are there any threads that discuss/explain it. As you can guess, I'm not a coder...:confused:...but I'm very curious.

Dufachi
12 Oct 2006, 17:18
Farcaster, for someone who's not in the know about such things how is this done? Are there any threads that discuss/explain it. As you can guess, I'm not a coder...:confused:...but I'm very curious.

You may want to take a look here:
http://www.vbulletin.org/forum/showthread.php?t=112406&highlight=display+profile+fields

adwade
08 Nov 2006, 07:02
Thanxx so much Dufachi! Looks like this will be my first serious code editing attempt.

emin3m
18 Nov 2006, 19:41
quries issue fixed

WeArab
18 Nov 2006, 20:25
Thank you man!

Will try it now ;)

adwade
18 Nov 2006, 20:54
quries issue fixed

Wow, I'll bet that took some time & effort. Congrats on bringing your MOD up to a new level! Still one of my FAVORITES!

Masked Crusader
19 Nov 2006, 01:12
Man, you have no idea how much this hack has helped! This hack has saved me so much time in the past couple of days.

I used to hate adding new profile fields, now I love it.

*CLICKS INSTALL*

vinnaboy
19 Nov 2006, 03:55
I upgraded the hack and now I'm getting this when I'm reading my PM:

Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(296) : eval()'d code on line 2

Warning: Invalid argument supplied for foreach() in /includes/class_postbit.php(296) : eval()'d code on line 9

How do I fix this? Thanks

emin3m
19 Nov 2006, 04:18
uninstall previous and install new one

vinnaboy
19 Nov 2006, 04:32
uninstall previous and install new one

I just did what you suggested but I'm still having the same problem. Please help, thanks!

emin3m
19 Nov 2006, 04:34
what fields are you displaying ?
confirm that they really exist
vbulletin version ?

vinnaboy
19 Nov 2006, 04:38
what fields are you displaying ?
confirm that they really exist
vbulletin version ?


The latest 3.6.3 and I'm using custom fields. I reinstalled the previous version and is working now but I need the newer version to work because of the queries fix.

John Stone
20 Nov 2006, 14:56
There seems to be a bug in the latest version. When I AJAX edit the last post in a thread and save it, the post no longer shows until I hit "refresh". After disabling the plugin the problem goes away.

emin3m
20 Nov 2006, 15:19
thanks for notifying,
its fixed but it wont show profile fields in postbits of post you edited, youll have to refresh for that

vinnaboy
20 Nov 2006, 15:39
Thanks! I installed it again and this time no more error messages but the fields don't show in the PMs.

CoreIssue
20 Nov 2006, 16:38
It just showed Updated on the forum. I will install new and see what happens.

emin3m
20 Nov 2006, 21:10
ok show in PMs fixed now
thanks for posting bugs guys

vinnaboy
21 Nov 2006, 00:24
Thanks! Excellent work!

acegames
21 Nov 2006, 22:19
Awesome , saved me some time , thanks :)

globalinsites
22 Nov 2006, 23:59
Has anyone upgraded to vb 3.6.4 yet? I'd like to know if this hack is still working okay in 3.6.4. Thanks.

globalinsites
02 Dec 2006, 05:38
Great hack. Not sure if I can post it here, but can someone tell me how I can edit the order of the fields in postbit? I'd like to move 'Posts' to below 'Join Date'.

I renamed the Location field to City (I think in my case City makes more sense because I also have a Country field), but now both the City and Location field show up. Can I remove the Location field from postbit somehow?

MrPHD
02 Dec 2006, 11:53
Great Job, useful for many reasons.Thanks

emin3m
02 Dec 2006, 17:58
Great hack. Not sure if I can post it here, but can someone tell me how I can edit the order of the fields in postbit? I'd like to move 'Posts' to below 'Join Date'.

I renamed the Location field to City (I think in my case City makes more sense because I also have a Country field), but now both the City and Location field show up. Can I remove the Location field from postbit somehow?
edit your template "postbit" and remove the location part

scootman
03 Dec 2006, 19:15
Very nice little thing, Thanks very mutch ;) "Click Install"

ChrisTech
06 Dec 2006, 18:23
Is there a way to make the item in the feild into a "clickable" html link?

As in for an online game, that requires clicks to 'grow'? Trying to figure out how to add it, so it shows your game username, and its a clickable link that's the 'recruitment link' in the same feild.

brhoom
07 Dec 2006, 11:38
Thanks.

Aeolian
10 Dec 2006, 01:51
Hay man, great mod.

Have a question, in my forum i wish to make special fields available to certain usergroups only. How do i do that?

Thanks in advance..

Aeolian
13 Dec 2006, 02:50
any hint/clue :(

Cronic82
20 Dec 2006, 00:48
installed.. but how can i put some space between the fields?
i have the profile postbit on the left,..so need to balance the fields out a bit so they are not all stacked..
i'd love 1 line of space between e.g. field 1 and field 2

ps: seems to work fine on 3.6.4

criscokid
13 Jan 2007, 11:44
This mod rocks!! I'd love to see this mod extended / enhanced to enable selected profile fields to be shown on the 'memberlist' page.

globalinsites
13 Jan 2007, 15:10
This mod rocks!! I'd love to see this mod extended / enhanced to enable selected profile fields to be shown on the 'memberlist' page.

You don't need this mod for that, it's a standard vB feature if I understand what you're asking: In Admin CP go to User Profile Fields: User Profile Field Manager -> select 'Show on Members List'

BudLeiser
14 Jan 2007, 15:39
Can this mod be made to work in conjunction with
http://www.vbulletin.org/forum/showthread.php?t=120833&highlight=clickable+user+field
?

If anyone knows how to hack this to work PM me.


GAH problem: I made a multie click checkbox and combined it with this. Instead of listing their selections like "Halo, Castevania" etc. It turned into a string of numbers

Video Games: 11793870

criscokid
14 Jan 2007, 18:25
You don't need this mod for that, it's a standard vB feature if I understand what you're asking: In Admin CP go to User Profile Fields: User Profile Field Manager -> select 'Show on Members List'
You're right... it does.

When I posted that message though I was thinking of the selected profile fields being shown (like it does in the posybit) under the username, not in a new clumn for each field like it does at present.

BudLeiser
04 Feb 2007, 15:07
Great mod thanks.
How can I pull custom fields to non-postbit areas?
Most specifically I want it in threadbit after $thread[postusername]
But using $post[field#] does not work.

Surviver
04 Feb 2007, 15:10
Try $thread[fieldX]

BudLeiser
04 Feb 2007, 15:17
Try $thread[fieldX]
Was one of the first alternatives I tried. No luck.
Same with
$thread[postuerfieldx]
$thread[userfieldx]
$thread[postfieldx]

etc

projectpilot
05 Feb 2007, 02:42
This hack does not work with drop down ( multiple selection) profile fields. Or does it?

criscokid
05 Feb 2007, 10:05
This hack does not work with drop down ( multiple selection) profile fields. Or does it?
This mod displays what's in the data field. Multiple selection field data is stored as a number: 1, 2, 4, 8, 16, 32, 64, etc so using it on multiple selection fields you'll probably just end up getting a string of numbers displayed unless the mod's been coded to take this into account. The easiest way to find out is to try it on one othose fields.

Krieg
06 Feb 2007, 13:55
Great job emin3m, thank you for this helpful hack.

I was wondering where was the code that adds these fields so that i can change them and replace the text string by an image that would have a path like /images/$post[field3].jpg

Maybe this is not the right place to ask, but who knows ;)

Anyway, thanks again :)

Pvtiste
18 Feb 2007, 15:31
installed !
Very great Job :)
Thx for sharing dude

jijo
05 Mar 2007, 14:57
great small hack installed and working :)

cdexs
14 Mar 2007, 09:22
oh.great, i need it :)

Tom_S
14 Mar 2007, 20:25
Nice job. Installed ;)

OmniBuzz
09 Apr 2007, 17:53
does not work with fields titles translation : it keeps one language forever...
No idea what's going on...

OmniBuzz
10 Apr 2007, 09:12
any help from anyone would be just nice :)

deb0
01 May 2007, 14:20
Mod works well, but I want to make this field mandatory. please help.

Lea Verou
01 May 2007, 16:52
Suggestion: Make it forum specific. Certain profile fields might be more useful in some forums than others and this hack could be a good solution for that. :)

(I haven't installed it and I may never do, I am just making a suggestion :))

2impulsiv
02 May 2007, 03:19
Thanks.. What I was looking for...


Cheers..

Nathan.

Mastar
13 May 2007, 00:07
Using Multiple-Selection Menu in VB3.6.6, in the screenshot where you see the 4 suppose to display the Operation System. Any ideas?

Extreme John
13 May 2007, 02:57
I installed this hack, it seemed to work, however on any new reply it doesnt show the field in the posbit, than if I "update" the "fields to show in postbits" it will than show, than it will not again in a new reply...

Any idea what might be causing this? I love the hack just not sure what this issue is about.

Giray
24 May 2007, 06:30
I have one field with quite a bit of information (over 150 characters). Any way to force a line break at some point -- basically to limit the width of the field. Otherwise, it simply runs into the other side of the page.

KevNJ
26 May 2007, 16:56
I installed this hack, it seemed to work, however on any new reply it doesnt show the field in the posbit, than if I "update" the "fields to show in postbits" it will than show, than it will not again in a new reply...

Any idea what might be causing this? I love the hack just not sure what this issue is about.

same thing here... as should everyone else have this problem

Mastar
26 May 2007, 23:39
I just added mine manually with a box around them:

http://custom-computerz.com/forums/showthread.php?p=10153#post10153

Saviour
27 May 2007, 03:29
Exactly what I was looking for.

Two thumbs up...if I had more thumbs...well, you know.

Works in 3.6.7...marked as installed.

v12kid
29 May 2007, 03:55
*Installed and working*

thanks!

BWJ
16 Jun 2007, 22:59
It works fine - but to be outstanding it needs to include the multiple selection fields... so pleeeease....

sidarta
02 Jul 2007, 10:33
selection radio buton use profile field is not posbits.

2impulsiv
02 Jul 2007, 14:35
This seemed to not like working with some other mod's I have running so I chopped it.

I put in the code myself and It's all good now. Weird....

Here is the code:

<if condition="$post['field5']"><div>Ride: $post[field5]</div></if>

And <if condition="$post['field6']"><div>Power: $post[field6]</div></if>

I'm working on a few changes to that for some ideas I've got. See how they go before I get excited..

Cheers

tipoboy
04 Jul 2007, 23:21
any way of seperating the profile fields by surrounding them with a border??

if so how would i do this?
thanks in advance
dave

sidarta
06 Jul 2007, 00:33
This seemed to not like working with some other mod's I have running so I chopped it.

I put in the code myself and It's all good now. Weird....

Here is the code:

<if condition="$post['field5']"><div>Ride: $post[field5]</div></if>

And <if condition="$post['field6']"><div>Power: $post[field6]</div></if>

I'm working on a few changes to that for some ideas I've got. See how they go before I get excited..

Cheers
Thank frends.

Multiple selection menu problem. Capture attach file..

Killeglass
06 Jul 2007, 19:53
Thank you

Great well needed mod :)

vash911
21 Jul 2007, 14:58
Installed the hack, but for some reason it removed the display of VbCredits. Despite VBCredits still being there it wont show in the postbit. When I go to the adminpanel for the hack it has a part of VBCredits mod above it and then below the options for the profile hack.

Darkwaltz4
22 Jul 2007, 01:50
Installed the hack, but for some reason it removed the display of VbCredits. Despite VBCredits still being there it wont show in the postbit. When I go to the adminpanel for the hack it has a part of VBCredits mod above it and then below the options for the profile hack.

I posted in the top post of vbcredits a plugin patch which is needed until vb updates to 3.6.8. Try applying that to see if it fixes the issue.

vash911
22 Jul 2007, 10:29
I posted in the top post of vbcredits a plugin patch which is needed until vb updates to 3.6.8. Try applying that to see if it fixes the issue.

Thanks that resolved my issue. Though i have a minor problem still with vbcredits.

When i click in the admincp --> Show Profile fields in Postbits

it also gives me part of the vbcredits menu. (see attachment)

It's not a huge issue, but if you know a fix I would gladly have it.

Krieg
01 Aug 2007, 12:05
I installed it and works very well ... but not well enough for me. I would like to have the content of the custom fields appear as an image. Therefore I managed in their description to make the content of them as the name of the image (without the .gif). Then I went in my postbit_legacy template, but could not find how it was implemented, and only found <div class="smallfont">
&nbsp;<br />
<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']"><div>
So now I am wondering how it appears ? :p so that I could have something more like <if condition="$post['field5']"><div>Classe: <img src="../images/misc/classes/$post[field5].gif" border=0></div></if>I hope someone would help me but I am at work right now and will dig deeper in that tonight ;)

periphrastic
15 Sep 2007, 22:00
Installed - thank you.

ssslippy
26 Oct 2007, 08:53
I figured id Point out a bug, currently if you go into just the post like this
http://immortal-guild.net/forums/showthread.php?p=234768#post234768
it does not show the profile fields. Not sure if this can be fixed with automated template edits.

Jackal von ÖRF
29 Oct 2007, 13:11
I added support for translated profile field titles (my forum has both English and Finnish language packs installed). I also did some code cleanup and updated the product's version, urls etc. The updated plugin (version 2.12) is attached to this message.

(In AdminCP the custom field titles and descriptions can be translated through: User Profile Field Manager > [Edit] > [Translations])

dknelson
07 Nov 2007, 05:02
I just installed this and it is really a nice product. Like some others here though, I would very much like it to use images instead of just text. I'm thinking something like the country flag mod which I also have installed. In my case, I'm using it for members to show how many of our events they have attended. I would like to create images with a number imposed on them. Right now, I just have the numbers ... 1, 2, 3, etc. in the selection box but I would love it if those numbers would actually load an image that I have created for each number.

WeArab
27 Dec 2007, 07:39
Heya,

No new updates?

mmmender
31 Dec 2007, 14:51
Installed and working on 3.6.8

jamestl2
22 Jan 2008, 00:38
any way of seperating the profile fields by surrounding them with a border??


I'd like to know this too.

ctfortner
25 Jan 2008, 18:23
excellent mod, thanks, installed

redlabour
29 Jan 2008, 18:52
Is it working on 3.7 or will there be a new Release ?

jluerken
31 Jan 2008, 19:25
Hi, could you please add the german version here?
The link in your first post points to vbhacks-germany.com which seems to be closed.

I would also like to see this for vB 3.7x

jfrenaye
14 Apr 2008, 18:38
Great mod. INSTALLED. Thanks.

I am having a problem with two of my fields where the user selects one or more options. The field entries are not coming out it is a number.

I have a list of afilliations: ABC DEF GHI JKL, etc. for them to select but when they do it it displays

Afilliation: 8856

ANy suggestions

Wired1
14 Apr 2008, 19:57
jfrenaye: As far as I know, no one's been able to solve that problem. Multiple mods are affected by that limitation of vB's design.

Goomzee
28 Apr 2008, 10:51
it' show me database error
Database error in vBulletin 3.6.10:

Invalid SQL:
Insert into datastore(title,data) values('showinpostbit','field2,field3');

MySQL Error : Duplicate entry 'showinpostbit' for key 1
Error Number : 1062
Date : Monday, April 28th 2008 @ 04:49:18 AM
Script : http://www.mknexusonline.com/forums/admincp/plugin.php?do=productimport
Referrer : http://www.mknexusonline.com/forums/admincp/plugin.php?do=productadd
IP Address : 202.61.51.198
Username : MKRayden
Classname : vb_database

donxmas
03 May 2008, 16:43
I'd love to see a 3.7 version as well.

globalinsites
03 May 2008, 22:57
Me too. I'm using this mod and want to upgrade vB to 3.7 and I'd love to be able to continue to use this mod.

Goomzee
03 Jul 2008, 09:27
this version is still not available in 3.7.2

bada_bing
12 Aug 2009, 19:10
Works with VB 3.8.3

redlabour
25 Jul 2010, 20:16
Any chance to get this for 4.x?

DFORMS
02 Mar 2011, 18:23
I need it for vb4 please!

ExciterNL
15 Apr 2011, 21:15
Me too!!!!!!!! :-)

teou
16 Sep 2012, 11:50
Hi everybody. I am using this on vb 3.8.5 (yes i know it's old but i cannot update a production environment easily) and i found a vbulletin bug. The bug is, in private messages my custom fields are shown to everybody even if the user is from a usergroup that has no rights to view them (and is not seeing the fields i the threads).

This has nothing to do with the plugin, but since i cannot update my vbulletin right now, i found a workaround patching this plugin:

1) Go to http://forum.spectrumnet.bg/admincp/plugin.php?do=modify
2) Find Product: ShowProfileFieldInPostBits and select to edit "get fields"
3) in the beginning, replace
if(THIS_SCRIPT=='showthread' || THIS_SCRIPT=='private'){
with if(THIS_SCRIPT=='showthread'){

You will thus disable showing custom fields in private messages and they will show only in threads.