Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: ballin - syyskuu 07, 2011, 06:57:41 IP

Otsikko: Multi-Color Variation in theme.
Kirjoitti: ballin - syyskuu 07, 2011, 06:57:41 IP
I need help with adding a multi-color theme variation. I tried adding the one Bloc posted about, and it didn't work considering it's like 3 years old xD

http://www.simplemachines.org/community/index.php?topic=102787

I was wondering if anyone would kindly share a modern working multi-color theme system?
Otsikko: Re: Multi-Color Variation in theme.
Kirjoitti: Akyhne - syyskuu 10, 2011, 03:18:20 AP
What forum version?
Otsikko: Re: Multi-Color Variation in theme.
Kirjoitti: Gary - syyskuu 10, 2011, 04:15:45 AP
Lainaus käyttäjältä: ballin - syyskuu 07, 2011, 06:57:41 IP
I need help with adding a multi-color theme variation. I tried adding the one Bloc posted about, and it didn't work considering it's like 3 years old
It's older than that, five years to be exact, how young I was. It should still apply for 1.1, well, the initial code Bloc gave me anyway, I got that working way back when, but for 2.0, you'll need to use the $settings['theme_variant'] ability included by default.

To call theme variants, do the following:

In index.template.php find the template_init function and add

$settings['theme_variants'] = array('blue', 'pink', 'green', 'red');


into it. Inside the array, define which colours you want to offer. The first will be set as the "hard" default, you can change that later in the admin center if needed.

Then in the css directory, include _[COLOUR].css files for things that are different among the variants, and a _[COLOUR] directory in the images directory for images where appropriate.