Ace of Clubs Designz®
« Difrent Styles for Diffrent Skins »

Welcome Guest. Please Login or Register.
Dec 15, 2009, 8:06am




Ace of Clubs Designz® :: Coding Studio :: The Filling Drawer :: Code Submissions :: Difrent Styles for Diffrent Skins
   [Search This Thread][Reply] [Send Topic To Friend] [Print]
 AuthorTopic: Difrent Styles for Diffrent Skins (Read 214 times)
Chase
Owner
********
Site Founder
member is offline

[avatar]



Joined: Jul 2007
Gender: Male
Posts: 132
 Difrent Styles for Diffrent Skins
« Thread Started on Jul 18, 2007, 5:27pm »
[Quote]

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.
Link to Post - Back to Top  IP: Logged

[image]
   [Search This Thread][Reply] [Send Topic To Friend] [Print]

Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!