How could I grab post background data?
#1
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?
Reply
#2
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.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#3
(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.
Reply
#4
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.
The only infinite thing is the universe and human stupidity, but the universe is not for sure

Plugins 1.6.x

Plugins 1.8.x

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)