MyBB Community Forums

Full Version: How could I grab post background data?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Fairly new to PHP, I'm trying to find out how can I get the background color information from a MyBB forum.

Basically, when you open the settings page on my plugin, I want it to display inside the text box what the background color already is, how could I get that and display the HTML code inside this text box?
I don't think this is something you're really going to be able to do - for one, there may be multiple themes installed, but even if there's just one, you'd effectively have to parse the CSS file to try and find the CSS selector that styles this element, and get the value with a regex. If I'm honest I'd find an alternative method of going about what you're trying to achieve with this.
(2016-12-08, 01:45 PM)Matt Wrote: [ -> ]I don't think this is something you're really going to be able to do - for one, there may be multiple themes installed, but even if there's just one, you'd effectively have to parse the CSS file to try and find the CSS selector that styles this element, and get the value with a regex. If I'm honest I'd find an alternative method of going about what you're trying to achieve with this.

I could just skip it all together and leave it blank/remove the option totally. I just wasn't sure if it was do-able. Google wasn't much help so I may just scrap the idea. Thank you for the response.
I think easiest method are using colorpicker.

You can customize it at tour own i release a free the on my suite called DNT advantage this teme improves that butonly con thead and some things appart bit you can change it todo background and then get the color palette live to work with.