Author Topic: Theme Variant per Board  (Read 294 times)

Offline mabley

  • Jr. Member
  • **
  • Posts: 118
Theme Variant per Board
« on: February 05, 2018, 01:37:21 PM »
I'm using SMF 2.0.15 and building a theme with color variants.

Right now, it's possible to set a theme per board, but I can't seem to set a variant per board. Does anyone know how to do this?

Offline Aleksi "Lex" Kilpinen

  • Support Specialist
  • SMF Super Hero
  • *
  • Posts: 16,325
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • aleksi-kilpinen on LinkedIn
Re: Theme Variant per Board
« Reply #1 on: February 11, 2018, 03:56:25 AM »
I don't think that's easily possible without you making a separate theme out of the variants you want to use like that.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,138
  • Master of BBC Abuse
Re: Theme Variant per Board
« Reply #2 on: Today at 03:51:40 AM »
Interesting question. My gut (which admittedly is out of practice on this stuff) is telling me it should be possible. A bit convoluted, but possible. Basically, all you want to do is call CSS by board, for which you in essence just need a CSS file name and a board ID.

All the standard variant system does is set a general call for a variant CSS file in the head section of index.template.php, along with calls for some variant versions of icons in some templates where applicable. So, rejigging that to call a CSS file by board ID or by action should do the trick. I very vaguely remember some such trickery in something I worked on, but offhand I can't remember exactly what it was.

To cut through the BS: yes, it should be possible.

The next question is: why do you want to do it?