MyBB Hacks

Full Version: Is this at all possible?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

I am looking at being able to let users stylise their profile pages by inputting HEX codes and image URLs into custom profile fields.

If they don't want to enter anything, though, I was hoping it would fill in as a preset default colour and image, which would be set in the coding.

My original idea was it input 'default' into the fields to use a default setting that would be assigned, and if they input their own setting (eg, 000000 for a Hex Code) it would insert that.

But I'm not sure how to have it differentiate between the inputs? Or is there some way to do 'if field is filled in, use that code. Else, if its empty, pull this default code'?

Any assistance would be amazing. I'm very much learning as I go here, so I appreciate your time!

Thank you!
You can use $userfields['fidX'] to get the RAW data of Custom Profile Fields, where "X" is the Profile Fields ID.

Sorry for late reply.
Hi!

Thanks for your help!

I have a further question, if you are able to assist;

Is there any way to force the $userfields['fidX'] to parse the BBC that is input from the user end?

I've heavily modified the profiles, using the userfields to set up the display, so of course now the BBC doesn't work and I don't want to allow HTML

Thank you kindly for any assistance!
Reference URL's