Post by Zaxinou on Jul 8, 2011 12:46:38 GMT 10
This code was made by iAlex and I'm reposting here.
This code will split your sub-boards (Put a space between each of the sub-board) with the option of having a header and footer image.
Just edit the red text at the top of the code with the height of the space between each sub-board.
Cross Browser.
Global Footer.
<script type="text/javascript">
<!--
/*Sub Board Splitter - By iAlex - Open Source*/
var iHeight="20px"; //Split Height
if(location.href.match(/board=/) && !location.href.match(/action/)){
var iTd=document.getElementsByTagName('td');
for(i=0;i<iTd.length;i++){
if(iTd.item(i).width=="66%" && iTd.item(i).align=="left" && iTd.item(i).vAlign=="top" && iTd.item(i).className.match(/windowbg2/)){
var iTheBoards=iTd.item(i).parentNode.parentNode.rows;
for(a=iTheBoards.length-1;a>=1;a--){
var iDiv=document.createElement('div');
iDiv.innerHTML='<div align="center" class="iSubBoardTop"></div><table class="bordercolor" cellpadding="4" cellspacing="1" width="100%" align="center"><tr><td class="titlebg" colspan="2"><font class="titletext" size="-1"><b>Sub-Board</b></font></td><td class="titlebg" width="1%" align="center"><font class="titletext" size="-1"><b>Topics</b></font></td><td class="titlebg" width="1%" align="center"><font class="titletext" size="-1"><b>Posts</b></font></td><td class="titlebg" width="24%" align="center"><font class="titletext" size="-1"><b>Last Post</b></font></td></tr><tr>'+iTheBoards.item(a).innerHTML+'</tr></table><div align="center" class="iSubBoardBot"></div><div style="height: '+iHeight+'"></div>';
var iNoStretch=iTd.item(i).parentNode.parentNode.parentNode.parentNode;
iNoStretch.parentNode.parentNode.parentNode.parentNode.insertBefore(iDiv , iNoStretch.parentNode.parentNode.parentNode.nextSibling);
}
iNoStretch.parentNode.parentNode.parentNode.style.display='none';
break;
}
}
}
//-->
</script>
If you were also interested in Having a head/base image on each sub-board, then you will need to use the following in your Global Header.
Just edit the red text with the URL of your head/base image. And then change the height, to whatever the height of the head/base image is.
<style type="text/css">
<!--
.iSubBoardTop{
background-image: url(Head Image Url);
height: 25px;
}
.iSubBoardBot{
background-image: url(Base Image Url);
height: 25px;
}
-->
</style>
This code will split your sub-boards (Put a space between each of the sub-board) with the option of having a header and footer image.
Just edit the red text at the top of the code with the height of the space between each sub-board.
Cross Browser.
Global Footer.
<script type="text/javascript">
<!--
/*Sub Board Splitter - By iAlex - Open Source*/
var iHeight="20px"; //Split Height
if(location.href.match(/board=/) && !location.href.match(/action/)){
var iTd=document.getElementsByTagName('td');
for(i=0;i<iTd.length;i++){
if(iTd.item(i).width=="66%" && iTd.item(i).align=="left" && iTd.item(i).vAlign=="top" && iTd.item(i).className.match(/windowbg2/)){
var iTheBoards=iTd.item(i).parentNode.parentNode.rows;
for(a=iTheBoards.length-1;a>=1;a--){
var iDiv=document.createElement('div');
iDiv.innerHTML='<div align="center" class="iSubBoardTop"></div><table class="bordercolor" cellpadding="4" cellspacing="1" width="100%" align="center"><tr><td class="titlebg" colspan="2"><font class="titletext" size="-1"><b>Sub-Board</b></font></td><td class="titlebg" width="1%" align="center"><font class="titletext" size="-1"><b>Topics</b></font></td><td class="titlebg" width="1%" align="center"><font class="titletext" size="-1"><b>Posts</b></font></td><td class="titlebg" width="24%" align="center"><font class="titletext" size="-1"><b>Last Post</b></font></td></tr><tr>'+iTheBoards.item(a).innerHTML+'</tr></table><div align="center" class="iSubBoardBot"></div><div style="height: '+iHeight+'"></div>';
var iNoStretch=iTd.item(i).parentNode.parentNode.parentNode.parentNode;
iNoStretch.parentNode.parentNode.parentNode.parentNode.insertBefore(iDiv , iNoStretch.parentNode.parentNode.parentNode.nextSibling);
}
iNoStretch.parentNode.parentNode.parentNode.style.display='none';
break;
}
}
}
//-->
</script>
If you were also interested in Having a head/base image on each sub-board, then you will need to use the following in your Global Header.
Just edit the red text with the URL of your head/base image. And then change the height, to whatever the height of the head/base image is.
<style type="text/css">
<!--
.iSubBoardTop{
background-image: url(Head Image Url);
height: 25px;
}
.iSubBoardBot{
background-image: url(Base Image Url);
height: 25px;
}
-->
</style>