MyBB Community Forums

Full Version: Custom profile fields not displaying on profile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

For some reason, my custom profile fields aren't displaying on my profile.

Below is the coding I have:

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder tfixed">
	<colgroup>
	<col style="width: 25%;" />
	</colgroup>
	
		<tr>
			<td class="{$bgcolor}"><strong>Xbox Gamertag:</strong></td>
			<td class="{$bgcolor}">{$userfields['fid11']}</td>
		</tr>
	
	
		<tr>
			<td class="{$bgcolor}"><strong>PlayStation ID:</strong></td>
			<td class="{$bgcolor}">{$userfields['fid10']}</td>
		</tr>

<tr>
			<td class="{$bgcolor}"><strong>Steam:</strong></td>
			<td class="{$bgcolor}">{$userfields['fid14']}</td>
		</tr>
	

		<tr>
			<td class="{$bgcolor}"><strong>Twitter:</strong></td>
			<td class="{$bgcolor}">{$userfields['fid8']}</td>
		</tr>
	
	
		<tr>
			<td class="{$bgcolor}"><strong>YouTube:</strong></td>
			<td class="{$bgcolor}">{$userfields['fid9']}</td>
		</tr>

<tr>
			<td class="{$bgcolor}"><strong>Skype:</strong></td>
			<td class="{$bgcolor}">{$userfields['fid13']}</td>
		</tr>
<if !empty($userfields['fid21']) then>
<tr>
			<td class="{$bgcolor}"><strong>Occupation:</strong></td>
			<td class="{$bgcolor}">{$userfields['fid21']}</td>
		</tr>
	</if>
	
	{$website}
	{$sendemail}
	{$sendpm}
	<if !empty($userfields['fid1']) then>
		<tr>
			<td class="{$bgcolor}"><strong>About Me:</strong></td>
			<td class="{$bgcolor}">{$userfields['fid2']}</td>
		</tr>
	</if>
</table>

And it looks like this on my page despite all fields being filled in on the settings:

[Image: 790bbd9c50e63cd24a2021ce23c3010f.png]

Thanks.
I think it must be $userfield['fid2'] without the "s"

Sorry for the mistake, it must be "without the s", and not "with".
(2015-08-25, 07:25 PM)Ad Bakker Wrote: [ -> ]I think it must be $userfield['fid2'] without the "s"

Sorry for the mistake, it must be "without the s", and not "with".

Thanks for your response. This doesn't work with or without the s added.
(2015-08-25, 09:03 PM)Ben C Wrote: [ -> ]Thanks for your response. This doesn't work with or without the s added.

Just tried it, and you're right. I'll have a closer look at member.php
It works in some parts of the profile but this doesn't work in the contact fields template. Wondering if this is a bug.
(2015-08-25, 09:03 PM)Ben C Wrote: [ -> ]Thanks for your response. This doesn't work with or without the s added.

I tried it out on my test site and it worked with $userfields['fid4'] (so now again including the s Big Grin )
(2015-08-25, 09:30 PM)Ad Bakker Wrote: [ -> ]
(2015-08-25, 09:03 PM)Ben C Wrote: [ -> ]Thanks for your response. This doesn't work with or without the s added.

I tried it out on my test site and it worked with $userfields['fid4'] (so now again including the s Big Grin )

Was this in the contact field template or a different field as that is the field I am having the issue with.
This was in usercp_profile, and also usercp_profile_customfields_field.

With the usercp_profile_contactfields template it will not work because these have nothing to do with fid's (customfields), and when the templates for this are evaluated, the fid's are not available.