#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Jan 23, 2011 4:50:55 GMT -8
This will do exactly what the title says, add skin specific background images to your sub-boards.. This part goes in either your Global Header (if you want the sub-board image/color to be the same throughout), or the board's header if you want different images per board.. <script type="text/javascript"> <!-- // Set image and colors for sub-board title bar..
var subCell = new Array();
subCell[1] = 'URL OF IMAGE,COLOR'; subCell[2] = 'URL OF IMAGE,COLOR';
var CSScode = '<style>.subbg {height: 25px;'; CSScode += 'background: url('+subCell[pb_skinid].split(",")[0]+') no-repeat center center;'; CSScode += 'background-color: #'+subCell[pb_skinid].split(",")[1]+';}</style>';
document.write(CSScode); // --> </script> Edit the colored part, where red is the skinID number, blue is the image URL and green in the hex value of the background color. You can leave the image URL out if you so wish, but you must keep the comma (,) in place. And this part goes in your Global Footer.. <script type="text/javascript"> <!-- // Image above sub-boards...
if(pb_action == 'boardindex') { var sub = document.getElementsByTagName('td');
for(s=0; s<sub.length; s++) { if(sub.className == 'titlebg' && sub.colSpan == '2' && sub.innerHTML.match(/Sub-Boards/)) { with(sub) {colSpan = 5; className = 'subbg'; innerHTML='';} sub[s+1].style.display='none'; sub[s+2].style.display='none'; sub[s+3].style.display='none'; }}} // --> </script> If you don't want to remove the sub-board title, remove the red part in the code above.
|
|