MyBB Community Forums

Full Version: Change background color
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been searching all over the style menu for the place to change the surrounding background color of this background element.

I can't seem to find the style textbox. The color currently is #F0F0F0.

[attachment=3402]
Thanks. That fixed it, but it seems to carry over to all the themes, both light and dark...
You can make a class for it, and replace bgcolor="x" with class="codebuttonsbg" or whatever you named it. Then you can add the CSS class in the Additional CSS portion of each theme.
Thanks. I'll do it.

Would updating to 1.2 in the near future break these sort of code modifications?
I doubt it, because changed templates are saved and not overwritten by an upgrade.

Although this being a major update it may.

Looking in the 1.2 admin cp, I think it will because it has a "Form Elements" CSS group.
Yes it will since all the templates in MyBB 1.2 have changed. All variables are in the form {$variable} now.
DrPoodle Wrote:Yes it will since all the templates in MyBB 1.2 have changed. All variables are in the form {$variable} now.

... I didn't know that. Hmm, I'll be sure to update the Wiki in the Authoring Templates part. Smile
Just to make sure people understand: the {$variable} syntax is not required. The "old way" of using variables in templates still works. The MyBB developers simply changed their coding standards, and now they use PHP's "complex syntax" for variables.

Read here for more information: http://php.net/manual/en/language.types....ng.complex
Which also means we can use proper arrays in the templates and not receive warnings.

For example

$ex[hi] becomes

$ex['hi']

Because of the way the template system works it was impossible to use single quotes in arrays because they're replaced with slashed single quotes before being evaluated.