MyBB Community Forums

Full Version: If a Custom Field is has no text in UserCP, don't show it on Post Bit of Thread.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So... it's something like this.

** If the user inputs a text in a Custom Profile field, then
* Show it in showthread's postbit
else
* Hide the field in showthread's postbit

I think this is more a plugin functionality, but any help will be appreciated, since I can't code. I get the logic, but not the actual code =P

Keywords: threadisplay, thread display
Hi lolfang!

It's pretty difficult to make a plugin do this, as more than likely you've added something like this to the postbit:

{$post['replink']}{$post['warninglevel']}
Facebook: {$post['fid4']}

You'll need to remove the "Facebook:" and the field value together. I've attached a plugin that will set a default value instead of removing it, but if this isn't good enough then we'll need more info about which profile field belongs to which tag...
Yeah... I'm actually trying to do this to use for Steam, MSN and things like that on postbit, just an Icon, maybe, so we get rid of the text. Let me try the plugin...
Er, activated the plugin and got like 50 mails about an error =P

Type: 2
File: inc/class_plugins.php (Line no. 142)
Message
call_user_func_array() [<a href='function.call-user-func-array'>function.call-user-func-array</a>]: First argument is expected to be a valid callback, 'hello_world_postbit' was given