1.6 Compatible: Hide empty profile fields in profiles
#1
This guide requires a core edit. If you do not feel comfortable with this, you might as well stop reading now.

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:

PHP Code:
        eval("\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";"); 

All we have to do is change it to the following simple code:

PHP Code:
        if ($customfieldval != '') {
            eval(
"\$customfields .= \"".$templates->get("member_profile_customfields_field")."\";");
        } 


Attached Files
.xml   patches-hide-empty-profile-fields.xml (Size: 1.28 KB / Downloads: 11)
Reply
#2
this is very usefull thanks. I feel empty fields are very ugly on a forums
euan likes this post
Reply
#3
This gave me idea how I can make a plugin for spammers. To check in specific filed is there anything like "kitchen", "vi**ra" or such things. If it is banhammer Happy
euan likes this post
Reply
#4
how can I do this for the blank contact informaton?
Reply
#5
I'll have to look into that, sounds like a good idea.
Reply
#6
I've almost finished this plugin, it's only left to change few things and it's ready Happy
euan likes this post
Reply
#7
Nice one Jovan!
Jovan likes this post
Reply
#8
Thank you Euan! Happy
Reply
#9
How can I do this for all other feilds that are left empty. Like the contact section of the profiles
Reply
#10
thx it works
but how can do this for postbits?
Reply