(REQ) 3 more custom profile fields hacks

SpeedRazors

New Member
Hi.I would like to share my postbit_legacy template codes with you guys.Here's another way to make your postbit legacy info look neater.Your Post counts,Location and any other info which you want,can be 'boxed' up nicely under your avatar.This should work in most versions of vb i believe and should be able to use it in the postbit template too though i havent try that out yet.Anyway,here how to do it....

1)In your Admincp,under Style Manager,Main CSS options,add inside the Additional CSS box
Code:
.postdata { 
	border-top: solid 1px #E0E0E0; 
	border-left: solid 1px #E0E0E0; 
	border-right: solid 1px #D7D7D7; 
	border-bottom: solid 1px #D7D7D7;
	margin: 3px 5px; 
	padding: 2px; 
	color: #808080; 
	background: #FFFFFF;
	font-size: 10px; 
}
and click Save

NOTE:You should change the color of the background of the box or size accordingly to the style you are using.

2)In your AdminCP,Style Manager,Edit Templates options,go to edit the Postbit_Legacy option,under this code,

Code:
					<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>

Edit the relavent <div> tags that you wish to become enclosed in the box to become <div class="postdata">.Meaning,you should get something like this

Code:
				<if condition="$post['joindate']">[color=red]<div class="postdata">[/color]$vbphrase[join_date]: $post[joindate]</div></if>
				<if condition="$post['field2']">[color=red]<div class="postdata">[/color]$vbphrase[location_perm]: $post[field2]</div></if>
				<if condition="$post['age']">[color=red] <div class="postdata">[/color]$vbphrase[age]: $post[age]</div></if>
				[color=red]<div class="postdata">[/color]
					$vbphrase[posts]: $post[posts]
				</div>
				<if condition="$show['infraction']">[color=red]<div class="postdata">[/color]$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>

See those changes i've made in red to what i meant.You can have as many details as enclosed neatly in the boxes and in what colors as you wish(just edit the values in the Step 1)

Screenshot below.I'm just sharing what i think is neat,i'm not a designer nor coder,so dont be hard on me!Thanks for reading!:)
 

SpeedRazors

New Member
First make the custom profile field you want to show. To do that Admin CP > User Profile Fields > Add New User Field.

Fill out what fits right for your profile field. Just remember the field number.

Once you did that, go to Admin CP > Languages And Phrases > Phrase Manager > Add New Phrase.

Fill it out as:
Phrase Type: GLOBAL
Product: vBulletin
Varname: (What ever you want it to be)
Text: (Example: If your custom profile field was favorite athletes this should be Favorite Athletes)

Once you did that go to Admin CP > Styles and Templates > Style Manager > (Skin you're editing) > Edit Templates > Postbit Templates > Postbit Legacy

Find:
Code:
Code:
<span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
Below It Add:
Code:
Code:
<if condition="$post['fieldx']"><div class="postinfo">$vbphrase[varnamehere]: $post[fieldx]</div></if>
Make sure to edit the bold letters/words in the code above.

Please don't be too harsh with this lol. I know there are newbies out there like me that didn't know how to do this.
 
Top