MyBB Community Forums

Full Version: Profilefields on Postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just needed a quick way to display custom profile fields in the postbit and if the field is left blank, it's hidden. SO, I installed this plugin: http://mods.mybb.com/view/profilefields-on-postbit but it does not work with the latest version of MyBB. It installs/activates fine, but the new settings don't show in the Custom Profile Fields > Add New Profile Field page.

I know how to accomplish all of this with the PHP in templates plugin, but I'd rather not install that. I was just wondering, could someone take a look at this plugin and see what's wrong? I've looked myself but can't find what's wrong.

Regards.
This can be done manually through templates, wouldn't need any extra plugin. Maybe template conditionals to keep it clean but that'd just be optional(if a profile field is empty, do not show the field in postbit).

Took a closer look at this.
http://community.mybb.com/thread-88768-p...#pid648341

{$post['fidX']}
Replace X with the field's ID.

You can find that when editing the profile fields, it's located in the URL.
[Image: KFPxTcv.png]
Do you know the correct code for this?

Custom profile field is filled in so show in postbit
else
Custom profile is blank so hide it.

I kow how to show the profile field on the postbit, but don't know the code to hide it if the user hasn't filled the field in.

Regards.
Using Template Conditionals:

<if {$post['fidX']} then>
{$post['fidX']}
</if>

I may be wrong, but give it a shot.
Thank you iHydra, I'll give it a shot.

Tried adding that code and it makes my whole post disappear.

Solved! This worked instead:

<if $post['fidX'] then>{$post['fidX']}</if>