MyBB Community Forums

Full Version: Custom Profile Field Separate Boxes on User's Profile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
When you visit your profile having Custom profile Fields enabled, you'll see some thing like this;
[attachment=22274]

If you want to make them Separate, then here is how;

Go to: ACP > Configurations > Custom Profile Field > Select the Custom Profile Field that you want to make it separate > Edit [Options] > Edit Field > and select Yes in the following two options; (Showed Red in the Preview)
- Required ?
- Hide on profile ?
[attachment=22275]

Save the field.

Now Go to: ACP > templates > Your theme's Templates > Member Templates > member_profile > and find;
{$signature}
and add the following code just below it;
<br/>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
	<tr>
		<td class="thead">
		<strong>Favourite Book</strong>
		</td>
	</tr>
	<tr>
		<td class="trow1">
		{$memprofile['username']}'s favourite book is: <strong>{$userfields['fid7']}</strong>
		</td>
	</tr>
</table>

Note couple of things:
1) {$userfields['fid7']} - This is the actual code which do the magic. You just need to replace 7 to the Custom Profile Field ID.
2) Use the Box Code (Provided Below) to use it for your rest of the Custom Profile Fields (which you need to separate them from the Additional Info box).
<br/>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
	<tr>
		<td class="thead">
		<strong>CUSTOM_PROFILE_FIELD_NAME</strong>
		</td>
	</tr>
	<tr>
		<td class="trow1">
		{$memprofile['username']}'s CUSTOM_PROFILE_FIELD_NAME is: <strong>{$userfields['fidX']}</strong>
		</td>
	</tr>
</table>

Where;
CUSTOM_PROFILE_FIELD_NAME = Your Custom profile field name.
X = Custom profile field ID.

Finally you'll see something like this: [attachment=22276]

Thanks Smile
nice sir. thanks for this
Thanks.
This wont allow more than one profile field to be inserted into the table other wise the profile page goes to a blank white page when you view it
(2011-04-19, 02:03 PM)Doctors Companion Wrote: [ -> ]This wont allow more than one profile field to be inserted into the table other wise the profile page goes to a blank white page when you view it

It allows, you need to add a Unique Profile Field ID in $userfields['fidX'] variable.
How would i do that?
Each custom profile field has a unique ID, you can find the ID's in ACP >> Configuration >> Custom Profile Fields

You use {$userfields['fidX']} in the template, replacing X with the actual profile field ID.
Which is what i was doing, but when i put more than 1 field there, it just sent my profile blank. When i tried to move it to a different place in my profile, blank white page....

Which template are you putting that code in?

Can you paste the code you're using here?
(2011-04-19, 04:29 PM)Doctors Companion Wrote: [ -> ]Which is what i was doing, but when i put more than 1 field there, it just sent my profile blank. When i tried to move it to a different place in my profile, blank white page....

You are doing something wrong, most probably I guess you are bringing wrong <table> code OR split some of its lines which causing the issue.
Pages: 1 2 3