MyBB Community Forums

Full Version: Custom Profile Fields on post?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, sorry if this is the wrong forum, im new here. I was wondering if there was some way that i could make a custom profile field show up under the "Group Name", "Joined", and "Status" fields in a post.
Yep just use:

{$post['fidx']}

And change x with the id of your new profile field.
Do you mean on a template? If so, which one? (I think im starting to understand the MyBB Structure a little better)
Yay! Nvm, i figured it out: Post Bit Templates -> Post_Author_User

Profile Name: {$post['fid4']}<br />

It worked! Smile
Please note the custom profile fields displayed on the postbit are not escaped from HTML ie. HTML will be parsed by the browser, unless you've applied a code modification to escape HTML...
so... how do i do that?
In inc/functions_post.php

Find:
$post['subject'] = $parser->parse_badwords($post['subject']);
Add after:
$post['fidX'] = htmlspecialchars_uni($post['fidX']);

Remember to change X to the field id, you'll need to do this for every filed you use.
kk, ty