|
Post by radiobath on Jan 21, 2008 9:38:33 GMT -5
So, I have rather whiny members about the layout, and want more choices. When making another skin, I couldn't find a way to save the coding for one skin, and then make coding for another. Am I missing something here, or is it impossible to have two or more customized layouts?
|
|
Samuel
Former Coding Moderator
:D
Posts: 154
|
Post by Samuel on Jan 22, 2008 14:24:05 GMT -5
There is no actual feature that makes it possible for this. However there are a few ways around this :-) 1. Different Headers & Footers for different skins code by California at SoCalThere is a code called exactly as said =] (Use the code database) 2. Using skin ids and external scripts and styles. Your default skin will always be pb_skinid=1; so if you have two skins, the other will be pb_skinid=2; For now I'll assume you don't know what those are. They are javascript variables, which we can use in a expression to check which skin is in use. so.. <script type="text/javascript"> <!-- //Skin Stylesheets & Scripts By Samuel - Global Header
var exScriptGH = (pb_skinid==1) ? "your external script for skin 1" : "for 2"; //Global Header Script var exStyle = (pb_skinid==1) ? "your external style for skin 1" : "for 2";
document.write("<script type='text/javascript' src='"+exScriptGH+"'></scrip"+"t>"); document.write("<link rel='stylesheet' type='text/css' href='"+exStyle+"'/>");
// --> </script>
<script type="text/javascript"> <!-- //Skin Stylesheets & Scripts By Samuel - Global Footer Section
var exScriptGF = (pb_skinid==1) ? "your external script for skin 1" : "for 2"; //Global Footer Script document.write("<script type='text/javascript' src='"+exScriptGF+"'></scrip"+"t>");
// --> </script>-- I suggest using the second option because it is definitely more stable.
|
|