Welcome Guest, Not a member yet? Register   Sign In
CSS color scheme switching
#6

[eluser]xwero[/eluser]
why can't you do something like
Code:
// controller
if(isset($_POST['color']))
{
setcookie("cookie[theme]", isset($_POST['color']);
}
if($this->input->cookie('theme'))
{
  $this->load->view('page',array('csstheme'=>$this->input->cookie('theme'));
}
else
{
setcookie("cookie[theme]", 'green');
}
// view
<link rel="stylesheet" type="text/css" href="theme_<?php echo $this->input->cookie('theme'); ?>.css" />

I don't understand why you would want to have an dynamic css file to make a theme switcher?


Messages In This Thread
CSS color scheme switching - by El Forum - 10-27-2007, 03:12 AM
CSS color scheme switching - by El Forum - 10-27-2007, 06:20 AM
CSS color scheme switching - by El Forum - 10-27-2007, 06:41 AM
CSS color scheme switching - by El Forum - 10-27-2007, 07:29 AM
CSS color scheme switching - by El Forum - 10-27-2007, 08:36 AM
CSS color scheme switching - by El Forum - 10-27-2007, 09:33 AM
CSS color scheme switching - by El Forum - 10-27-2007, 10:00 AM
CSS color scheme switching - by El Forum - 10-27-2007, 10:50 AM
CSS color scheme switching - by El Forum - 10-28-2007, 09:41 AM
CSS color scheme switching - by El Forum - 10-28-2007, 11:39 PM
CSS color scheme switching - by El Forum - 10-29-2007, 02:06 AM
CSS color scheme switching - by El Forum - 10-30-2007, 01:17 AM
CSS color scheme switching - by El Forum - 10-30-2007, 11:42 PM
CSS color scheme switching - by El Forum - 10-31-2007, 07:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB