different backgrounds for selective boards

Started by RFD, August 13, 2017, 06:33:10 PM

Previous topic - Next topic

RFD

i need the ability to have some of my forum's boards utilize a totally different background, is that doable in smf 2.1.xx?

i'm currently using the default theme, and have modded the index.css file to have a fixed image, but would like some boards to have a different fixed background image.

background: #E9EEF2 url(../images/theme/backg1.jpg) no-repeat fixed;

Kindred

You can set an individual theme for any individual board, yes
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

RFD

yep, found that i can clone the current theme, tweak it, use the cloned theme for a specific board.

but that means having an entire theme for perhaps a dozen boards, meaning a dozen added themes.

isn't there an easier way around that?



Illori


RFD

ok, thanx - not a problem for my as my domain has unlimited server space and bandwidth.   8)


Illori

there is no such thing as unlimited hard drive space or bandwidth. most likely you have an oversold host that will restrict you one way or another.

RFD

i own my personal server, so *everything* is unlimited.  ;)

actually, servers - i have three.  8)

Gwenwyfar

Quote from: RFD on August 14, 2017, 06:00:58 AM
yep, found that i can clone the current theme, tweak it, use the cloned theme for a specific board.

but that means having an entire theme for perhaps a dozen boards, meaning a dozen added themes.

isn't there an easier way around that?
Yes, in 2.1 every board has it's own ID, so you can use something like

body#board_3 {
background: A; }

body#board_23 {
background: B; }


etc.
"It is impossible to communicate with one that does not wish to communicate"

Illori

is that for within the board or on the board index?

Gwenwyfar

Quote from: Illori on August 14, 2017, 09:33:16 AM
is that for within the board or on the board index?
The entire board itself (topics, reply section, index). Though the board index has the same IDs, so you can add a body selector in there to exclude them.
"It is impossible to communicate with one that does not wish to communicate"

Antes

This is bit hackish method.

Code (Find) Select
<body>
Code (Replace) Select
<body id="board_', isset($context['current_board']) ? $context['current_board'] : 'index','">';

now you can use #board_1 #board_2 etc... to define specific classes for that board do mind this is NOT limited to background you can literally change everything related to that place.

Side Note: sub-boards has its own ID so don't expect parent board's rules to apply there.

Advertisement: