View Full Version : how to show custom fields in showthread profile
Professional2
03-22-2010, 01:07 PM
hi i want to define some custom filed like Mobile model and ... then show them in profile of members in showthread.
what shoud i do?
by the way my version os 4.0.2
Charlie98902
03-22-2010, 01:54 PM
This isn't to hard and this is what I did:
1. Create a new plugin via the plugin manager.
2. product - vbulletin
3. Hook - postbit_display_start
4. title - extra profile fields
5. execution order - mine is set at 5.
6. plugin php code:
if($post[fieldx]) $html .= '<dt>Name</dt> <dd>'.$post[fieldX].'</dd>';
if($post[fieldx]) $html .= '<dt>Name</dt> <dd>'.$post[fieldX].'</dd>';
$html .='<br /><br />';
$template_hook['postbit_userinfo_right_after_posts'] .= $html;
Edit all the red and as you can see you can add more to it copying and pasting the one line of code to have 3,4,5,6, etc.... You do need to edit the red so you will need to make the profile fields first then add this plugin.
Professional2
03-31-2010, 12:53 PM
but it didn't work for me.
Charlie98902
03-31-2010, 01:49 PM
Works for me sorry it didn't for you.
jan1024188
03-31-2010, 01:53 PM
why I get bad request error when I try to open thread?
Charlie98902
03-31-2010, 03:18 PM
The fields were made b4 you made the plugin active right? Did you put the changes needed in red to represent your profiles & field numbers?
Professional2
04-01-2010, 03:55 AM
right but i did it.
for example i want 2 custom set:
1)gender: female or male
2)mobile: nokia,apple,sony ericsson
what shoud i do exactly?
tnx for your answer
Charlie98902
04-01-2010, 10:25 AM
right but i did it.
for example i want 2 custom set:
1)gender: female or male
2)mobile: nokia,apple,sony ericsson
what shoud i do exactly?
tnx for your answer
Oops I see I forgot to highlight 2 areas in red that you need to change the field11 and field12 at the beginning of the hook sorry. Here is what yours needs to show but O left the field number with an x as I do not know what it would be on your end but you'll know when you create the profile field.
if($post[fieldx]) $html .= '<dt>mobile</dt> <dd>'.$post[fieldX].'</dd>';
if($post[fieldx]) $html .= '<dt>gender</dt> <dd>'.$post[fieldX].'</dd>';
Professional2
04-02-2010, 04:26 AM
tnx man .I'll try it
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.