theme color variations for SMF 2.1

Started by lesmond, Mar 05, 2019, 12:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lesmond

If possible I would like to make a theme where you can change colors in theme settings and the user can change them too.

I know that I would need a different .css for each color and extra folder for each image, but doing the coding is the hard bit. :dontknow

I have looked at themes for 2.0.15 that have done that, but I am not able to convert those to work with 2.1 :hwhat 

Any ideas would be great please :rgton

The only person who got all his work done by Friday was Robinson Crusoe

Bigguy

Can you link me to a theme that does it so I can see. :hwhat

lesmond


The only person who got all his work done by Friday was Robinson Crusoe

Bigguy

I downloaded that bluezcolor zip and will go over it in a second or two. Waiting for a phone call.

Bigguy

I think the switch for the css is in the themes.js file. Does that help at all.

lesmond

I Thought that too, but from what I see its Settings.template.php and other code in index.template.php, themes.js is in all themes even 2.1

also there are language strings in ThemeStrings.english.php in the languages folder.

The only person who got all his work done by Friday was Robinson Crusoe

Bigguy

I could not find anything in Settings.template.php Maybe i didn't look hard enough.

lesmond

Mar 05, 2019, 03:41 PM #7 Last Edit: Mar 05, 2019, 03:45 PM by lesmond
Ok there are 3 files that are relevant..

ThemeStrings.english.php
Settings.template.php
index.template.php

and obviously the .css for each color

Keywords to search is "variant" or "variation"

The only person who got all his work done by Friday was Robinson Crusoe

Bigguy


Bigguy

index.template.php file:

/*Theme changer*/

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

lesmond

found that already, in fact I found most of them, now all I need to know is how to make them work in 2.1

The only person who got all his work done by Friday was Robinson Crusoe

lesmond

Ok gonna leave it for tonight, going to have a few... a lot of rum and coke ;)

The only person who got all his work done by Friday was Robinson Crusoe

Bigguy

Lol, I will look over 2.1 themes later. Maybe there is something on the theme site that changes color.

Bigguy


lurkalot

You know @SychO is a member here, and perhaps could point you in the right direction.  ;)