Advertisement:

Author Topic: different backgrounds for selective boards  (Read 1448 times)

Offline RFD

  • Jr. Member
  • **
  • Posts: 161
different backgrounds for selective boards
« on: August 13, 2017, 06:33:10 PM »
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;

Online Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,099
  • Gender: Male
    • Kindred-999 on GitHub
Re: different backgrounds for selective boards
« Reply #1 on: August 13, 2017, 09:17:25 PM »
You can set an individual theme for any individual board, yes
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline RFD

  • Jr. Member
  • **
  • Posts: 161
Re: different backgrounds for selective boards
« Reply #2 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?



Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 48,054
Re: different backgrounds for selective boards
« Reply #3 on: August 14, 2017, 06:02:06 AM »
nope there is no other way around this.

Offline RFD

  • Jr. Member
  • **
  • Posts: 161
Re: different backgrounds for selective boards
« Reply #4 on: August 14, 2017, 06:05:41 AM »
ok, thanx - not a problem for my as my domain has unlimited server space and bandwidth.   8)


Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 48,054
Re: different backgrounds for selective boards
« Reply #5 on: August 14, 2017, 06:13:37 AM »
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.

Offline RFD

  • Jr. Member
  • **
  • Posts: 161
Re: different backgrounds for selective boards
« Reply #6 on: August 14, 2017, 06:21:04 AM »
i own my personal server, so *everything* is unlimited.  ;)

actually, servers - i have three.  8)

Online Gwenwyfar

  • Customizer
  • Full Member
  • *
  • Posts: 679
  • Gender: Female
    • Gwenwyfar on GitHub
Re: different backgrounds for selective boards
« Reply #7 on: August 14, 2017, 09:31:21 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

Code: [Select]
body#board_3 {
background: A; }

body#board_23 {
background: B; }

etc.

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 48,054
Re: different backgrounds for selective boards
« Reply #8 on: August 14, 2017, 09:33:16 AM »
is that for within the board or on the board index?

Online Gwenwyfar

  • Customizer
  • Full Member
  • *
  • Posts: 679
  • Gender: Female
    • Gwenwyfar on GitHub
Re: different backgrounds for selective boards
« Reply #9 on: August 14, 2017, 09:37:37 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.

Offline Antes

  • Evil Black Cat
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,646
  • Gender: Male
  • Black cat rulz!
    • Antes on GitHub
    • merta on LinkedIn
    • @antesistan on Twitter
    • Lunarfall
Re: different backgrounds for selective boards
« Reply #10 on: August 14, 2017, 09:48:25 AM »
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.
Active Project(s): [ SimpleDesk ] # [ Lunarfall ] # [ CoreStore ]

Past Project(s): [ ezPortal ]