MyBB Community Forums

Full Version: Custom Profile Fields
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have a custom profile field on my forum, called MacSpecs, and it seems that somehow it automatically made it's way onto the sidebar(on the left) of all the posts. This is perfectly alright, but if the MacSpecs field is too large(for example, a lot of macs, or a lot of detail) it makes the left bar(where user titles, etc. are shown ) far wider than it should be.




The first attached pic is what it should look like, where, it wraps, similar to the reputation points of Chris. (No need to thank me Chris, I love you. Lol.)

The second pic is what it looks like on my forum, where it wraps, but still makes it far wider than it should be!
I do believe the reputation points (which btw, only Chris and myself have 80+ reps (minimum needed to go to next line) Big Grin) wrap because they images (which may be slightly different).

btw, custom profile feilds arn't addslashed I dont think Confused You'll have to do this to stop SQL injections Toungue
k776 Wrote:btw, custom profile feilds arn't addslashed I dont think Confused You'll have to do this to stop SQL injections Toungue

The problem with showing custom profile fields on the postbit is that they are not htmlspecialchar'ed, which means, any HTML input that you haven't escaped in the PHP code will be outputted as norma HTML code in the postbit.
doh! Wrong function Wink Thanks for correcting me Dennis Big Grin
err, you just confused me.

either way, is there at least a way to turn off that specific custom profile field from displaying on the posts? like it was before PR2?
I had this happen to me though I chose to keep it and add a few more.

Find the postbit templates (for me mybb added the extra custom field to postbit_avatar) and you are looking for any reference to $post[fidx] where x is the number of the custom field, and just edit it out.
Check the template postbit_avatar for
$post[fid4]
and edit this out. This is where I found it in my set up. It would therefore be appearing twice because this template is displayed inside the postbit template.

Incidently $post[fid4] is the custom field that showed up automatically on my forum. Is the inclusion of this an error that has been overlooked in this template?

Oh, I see. Thank you
Pages: 1 2