PDA

View Full Version : Change Style based on users choice.


Dilmah
09-09-2005, 02:07 AM
What I currently have is three levels of styles:
1. Parent Style, which contains all template modifications.
2. Three styles suited to different screen/surfing capabilities ('1280x760', '800x600' and 'dialup'), all done only changing the css.
3. A further group of styles to apply to single forums, which basically change the colour scheme. (eg. 'Red and blue', 'Green and yellow' etc.) These styles are only available for one forum.

What I want to have is a way of making the third level of styles dependant on the second.

So in other words, I want to use an if/then statement for each forum to say:

if stylelevel2="dialup" then
thisforumstyle="dialup_redandblue"
else if stylelevel2="1280x760" then
thisforumstyle="1280x760_redandblue"
else if stylelevel2="800x600" then
thisforumstyle="800x600_redandblue"

Does this make sense?

I only need to know a possible solution of where to put this code, and how to put the second style into a variable (stylelevel2). Once i have that I should be able to code it myself - but if you want to code it too that's fine.

Thanks.

Doesn't matter. I think i've got it.