Chase Owner
        Site Founder member is offline
![[avatar]](http://i33.photobucket.com/albums/d74/willembahh/Red-Hat-cropped.jpg)
Joined: Jul 2007 Gender: Male  Posts: 132
|  | Difrent Styles for Diffrent Skins « Thread Started on Jul 18, 2007, 5:27pm » | |
Many people want to have different styles on their boards for different skins. Things like gradients, extra text colors, and anything else done using CSS can be set to work for each different skin with this code.
Place in Global Headers
Code:<script type="text/javascript"> <!--
/* Different Styles for Different Skins */
//Edit styles here
var styleskin1='Line 1'+ 'Line 2'+ 'Line 3'+ 'Line 4';
var styleskin2='Line 1'+ 'Line 2'+ 'Line 3'+ 'Line 4';
var styleskin3='Line 1'+ 'Line 2'+ 'Line 3'+ 'Line 4';
//Do not edit
var styles=new Array(); styles[0]='';
//Edit number of skins here
styles[1]=styleskin1; styles[2]=styleskin2; styles[3]=styleskin3;
//Do not edit below
document.write('<style type="text/css"><!-- '+styles[pb_skinid]+'// --></style>');
// --> </script>
|
|
I'll break down the editable parts below for anybody that isn't fluent in javascript.
Code:var styleskin1='Line 1'+ 'Line 2'+ 'Line 3'+ 'Line 4';
|
|
Here is where you edit the actual CSS attributes. In each line put "body { background-color: #999999; }" or whatever else you want in your style. Make sure you leave the single quotes and plus signs in there, as well as the semicolon at the end, it won't work without them.
Code:styles[1]=styleskin1; styles[2]=styleskin2; styles[3]=styleskin3;
|
|
This is the list of skins in your board. If you want to find the order, go edit your profile, and look at the order they appear in the dropdown. The first one is 1, second 2, and so on. The number of fields should match the number of skins you have, and each field should have a corresponding "styleskin#" entry above.
For any code support, please post your board URL with your question, so that it is possible to check your headers.
|
![[image]](http://i202.photobucket.com/albums/aa25/mezorro2/Aceofclubdesignzv2.png) |
|