MyBB Community Forums

Full Version: Extract Value From CSS?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'm working on a plugin that displays on a thread's first post. The CSS class the first post uses is "trow1."

How can I define a variable so that my code can say the following?
$bgcolor = $trow1_bkgrnd

Thanks,
Peter
hello Peter,uhmm i don't know exactly but
you can change it from the showthread.php.
and you can use the $trow1_bkgrnd, if you describe it as $trow1_bkgrnd = "trow1";
Enes*
There's no neat way to do it.

Why do you need it? If you want something to look the same, just set the element's class to "trow1". You can override unwanted CSS properties by supplying your own.
Well, it's part of the Digg code. I've finished the mod, and the script works nicely in all scenarios, but I guess the only thing I can do for the background color is put an option in the ACP.

See it in action here (after signature in first post, line 213 in the code):
http://scriptingsite.com/forums/how-to-d...t-174.html

-Peter