Thread: MultiSkin
View Single Post
  #9  
Old 10-13-2003, 12:37 PM
 
buster buster is offline
 

Newbie
  
Join Date: Feb 2003
Posts: 7
 

Default

Ok.. so first off i'm not the php wiz (or smarty wiz at that) but I was/am screwing around with this.

What about going into smarty.php and putting in an if statement:
Code:
if( $HTTP_GET_VARS['skin'] == 2){ $smarty->template_dir = BASEDIR.DIRECTORY_SEPARATOR."skin2"; $smarty->compile_dir = BASEDIR.DIRECTORY_SEPARATOR."templates2_c"; $smarty->config_dir = BASEDIR.DIRECTORY_SEPARATOR."skin2"; $smarty->cache_dir = BASEDIR.DIRECTORY_SEPARATOR."cache2"; $smarty->secure_dir = BASEDIR.DIRECTORY_SEPARATOR."skin2"; $smarty->debug_tpl="file:debug_templates.tpl"; } else { $smarty->template_dir = BASEDIR.DIRECTORY_SEPARATOR."skin1"; $smarty->compile_dir = BASEDIR.DIRECTORY_SEPARATOR."templates_c"; $smarty->config_dir = BASEDIR.DIRECTORY_SEPARATOR."skin1"; $smarty->cache_dir = BASEDIR.DIRECTORY_SEPARATOR."cache"; $smarty->secure_dir = BASEDIR.DIRECTORY_SEPARATOR."skin1"; $smarty->debug_tpl="file:debug_templates.tpl"; }
And
Code:
if( $HTTP_GET_VARS['skin'] == 2){ $smarty->assign("ImagesDir","../skin2/images"); $smarty->assign("SkinDir","../skin2"); } else { $smarty->assign("ImagesDir","../skin1/images"); $smarty->assign("SkinDir","../skin1"); }


It seems to work, but I know 0 (<-- thats a zero) about cookies.

Will this break anything???


[Edit] I guess it would help if i finish a thought.

I know 0 about putting this in a cookie, so the url doesn't always have ?skin=# in it
[/Edit]
Reply With Quote