News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Different stylesheets in one theme

Started by Gary, July 30, 2006, 10:26:20 PM

Previous topic - Next topic

Col

Quote from: Bloc on December 08, 2007, 05:07:40 AM
I actually looked further into this, for my newest themes. As of now i've been using either a form/dropdown (like in Helios) which saved things for members but not guests, or the stylesheet approach(described earlier in this topic)..which saves only to a cookie.

Well, I decided to go for a new approach: I converted slightly the upshrink routine in SMF to save actual names, and also in the cookie, meaning a user choice can be made instantly, but still save and remember both members(into db table) or guests(cookie) choice. I believe this is the best option, rather than using a "hack" (like Helios) or actually both css loading & javascript to just adjust a fontsize or forumwidth. This method only use javascript and directly adjusts the style where its supposed to change.

I need to test it out a bit first, but will happily share it later on.

Hi Bloc,

Did you do this? It just what I'm looking for!

I'm looking to make some major changes to my website and forum, and would dearly like to improve accessibility. This kind of switching would be ideal, and should be - dare I say - made part of the core SMF code. Accessability could be improved at a stroke, and might also provide a simple way for people to 'skin' the default theme, without having to add any new code or duplication of theme templates. It would also need to include an option to change the image folder too.

Thanks.

bloc

Only saw this today :P..yes, I have used in a number of themes already. And yes, the option to specify alternative stylesheets that change instantly is also part of SMF2 now(partly). The option of changing the images folder isn't, but you don't really need that if you use stylesheets to fetch backgrounds.

It will not replace adding themes though, its essentially a "theme color version" changer - not an full-on theme replacer. What you seek I suspect its more like CSSZEngarden, that one HTML can be styled totally different. With default theme going more css-based/semantic coded thats an option, but that too still is only limited to how the theme treats the "versions".

Col

Thanks for the reply.

So, I will have to use SMF2 - is this what you are saying?

Although just switching backgrounds is sufficient, sometimes other images need changing to (so there no halo effects with some GIFs, or ill-matched backgrounds if JPEGs are used instead). I'm working on alterante theme that requires that I change the backgrounds of supplied images to match the new backgrounds. I will need the ability to change images when this theme is selected.

Quote from: Bloc on July 25, 2008, 10:03:31 AMAnd yes, the option to specify alternative stylesheets that change instantly is also part of SMF2 now(partly).

Partly? Do you just mean that the images folder cannot be changed with the CSS switcher?

A simple theme switcher (just CSS AND images) seems like a must to me. This will enable most people to personalise an SMF themselves, making it easier for them to integrate to their site.

IchBin™

If you place all of your images as a background (which I would suggest), then all you need is the style sheet change. You can then have each stylesheet call its own images as well.
IchBin™        TinyPortal

Col

Hi IchBin

I mean images for buttons, etc.

Gary

There's a couple of posts on the first page on how to make (all) images be called by colour specific directories, not that I recommend doing that.
Gary M. Gadsdon
Do NOT PM me unless I say so
War of the Simpsons
Bongo Comics Fan Forum
Youtube Let's Plays

^ YT is changing monetisation policy, help reach 1000 sub threshold.

SinekSekiz

Hi All.

Me again. I changed another template to multicolor with these codes. Works like a charm. I really loved it. But I would like to do two things.

First I would love to change the color names to language specific names. So if the theme I multicolored used by any of the other languages that SMF supported it would support that languages color names.

And Second if this is not possible I would like to use some pics instead of dropdown menu or the button.

Is any of these possible and how. Because few pages ago Bloc said that it works differently and he does it whit some style classes but he did not mentioned how.

Thank you for your helps anyways.
You know you want to use it... So use it.

Dulce et Decorum est Pro SinekSekiz Mori

We are all figures. For men it's the money in your bank. For women it's the cup size of your boobs.

DilSe

hello to all

Pl anybody tell me how to use another them

i use SMF Package Parser  it's not working Pl anybody help me

IchBin™

You should perhaps start your own topic and give some details to your problem. I don't have a clue what you're trying to say in your last post.
IchBin™        TinyPortal

Advertisement: