MyBB Community Forums

Full Version: Including Custom Profile Field
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I include a custom profile field in the postbit template?
Add {$post['fidX']} to your postbit template, or where ever you want the custom profile field to show. Change the X to the id of the custom profile field, which you can find out by looking at the URL when editing a custom profile field.

I'm not 100% sure if this is still required, but I believe it it:
Quote:Please note that HTML is not escaped by default for custom profile fields! That is, if users enter HTML into the custom profile field, the HTML will be displayed as is, and parsed by the browser. To escape HTML from the custom profile field, please make the following modification to inc/functions_post.php:

Find:

eval("\$post['user_details'] = \"".$templates->get("postbit_author_user")."\";");
Before that line, add:

$post['fidX'] = htmlspecialchars_uni($post['fidX']);
Remember to replace the X with the ID of the custom profile field that you want to display.
Thank you. Smile