vBulletin

Thank you for visiting. This is our website archive. Please visit our main website by clicking the banner above.
vBulletin FAQ is dedicated to helping the forum owner build, manage and profit from his vBulletin Forum
vBulletin Web Hosting - Free skins and styles for your vBulletin - Search Engine Optimization




[How To] Create a Custom Profile Field and Add It To Your Postbit

Peggy
07-17-2007, 07:20 AM
To create a new profile field -
Login to your Admin CP
Scroll down to User Profile Fields
Click on Add New User Profile Field
Fill out all information on the next page. Pay special attention to Field Required (yes or no) and the display page.
Save (make a note of the # of the profile field, you're going to need it!)Now we're going to add this profile field to the postbit or postbit legacy template (depending on which one you use). For the purposes of this tutorial, we'll use postbit legacy, since that's what I use :)
Still in the Admin CP
go to Styles & Templates
Style Manager > Postbit Templates > postbit_legacyDecide where you want this new profile field. In this tutorial, we'll place it below the join date. So, find:
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>

and add below:
<if condition="$post['fieldX']">
$post[fieldX]
</if>


Replace the X with the # of the profile field that I told you to note ;)

Now, you may also want to label that profile field. For example, gender, first name, etc.

if so, change the code as follows:

<if condition="$post['fieldX']">
Gender: $post[fieldX]
</if>



Enjoy!

nymyth
07-17-2007, 08:24 AM
nice tute....do you know how to make a new field that a user has to fill out on registration?

Peggy
07-17-2007, 09:53 AM
Read #4 in the first post. That's where you set it for required.

the1n0nly
07-22-2007, 11:46 AM
Hey great tutorial but i was wondering what if you want the information to show even if the field is not filled like i want there to be

Location:
Mood: Happy
Grahpics Level:
Battle Won: 0
Battle Lost: 0

like that and is it possible to set for example battle won/lost to have a default setting like 0.

Half Pint
07-22-2007, 12:53 PM
Hey Peggy! Thanks for this, was wondering how you did it!
Thanks

Peggy
07-22-2007, 01:01 PM
Hey great tutorial but i was wondering what if you want the information to show even if the field is not filled like i want there to be

Location:
Mood: Happy
Grahpics Level:
Battle Won: 0
Battle Lost: 0

like that and is it possible to set for example battle won/lost to have a default setting like 0.
No idea, that would take some coding. This is for just a simple extra profile field.


vBulletin

seo book

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum