News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

2.1 Beta3 Memberlist custom profile fields

Started by kat★, June 07, 2017, 07:00:57 AM

Previous topic - Next topic

kat★

Hello,

If a member has a custom field with icons filled out and they appear on the memberlist, the icon is there as it should be, however, if the custom field is left empty, the memberlist still shows everything in the "Enclosed Within Text" section of said custom field but the {INPUT} part.

How do I go around making it so that if the {INPUT} is left blank, the following string leaves the column empty?
// Show custom fields marked to be shown here
if (!empty($context['custom_profile_fields']['columns']))
{
foreach ($context['custom_profile_fields']['columns'] as $key => $column)
echo '
<td class="centertext">', $member['options'][$key], '</td>';
}


Kind regards, kat
I use smf to learn to write php and css. It's pretty neat. |

Gwenwyfar

"It is impossible to communicate with one that does not wish to communicate"

Gwenwyfar

"It is impossible to communicate with one that does not wish to communicate"

Advertisement: