2011-12-19, 04:12 PM
Ever looked at a MyBB user's profile and wondered why on earth empty profile fields are displayed? I know I have. That's why I decided to stop empty profile fields from being displayed on my forum and in this guide I'll show you how to do the same.
To achieve this, we'll be making a core file edit. I therefore advise the use of frostschutz's amazing Patches plugin and I've also included an attached patch file.
The file we'll be editing is member.php and we'll be editing around line 1774, which is this:
All we have to do is change it to the following simple code:
Simple. I wish I could do it quite so easily for the contact details (well, I have on my own forum, but it takes a slight bit more effort).
To achieve this, we'll be making a core file edit. I therefore advise the use of frostschutz's amazing Patches plugin and I've also included an attached patch file.
The file we'll be editing is member.php and we'll be editing around line 1774, which is this:
eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";");
All we have to do is change it to the following simple code:
if ($customfieldval != '') {
eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";");
}
Simple. I wish I could do it quite so easily for the contact details (well, I have on my own forum, but it takes a slight bit more effort).