Post by CrAzY_J on Nov 1, 2005 0:58:17 GMT
Code description: In the board cells a link will appear to the sub-boards inside that board.
Code preview: Click
Code placement: Main Footers
code creator: CrAzY_J
Code beta tester: hp_mad
<script type="text/javascript">
/* Sub Boards in board cell
created by CrAzY_J ( hatakeforum.proboards30.com )
Do not redistribute this code without the creator's permission*/
var gCell = document.body.getElementsByTagName( "td" );
if( this.location.href.match(/\.com(\/(index\.cgi(\?|#\w+)?)?)?$/))
{
for( var sel = 0 ; sel < gCell.length ; sel ++ )
{
for( var bol = 0 ; bol < gCell.length ; bol ++ )
{
if( gCell[sel].align == "right" && gCell[sel].firstChild.options)
{
var Options = ( gCell[sel].firstChild.options[0].innerHTML.match(/Forum\sJump/) )? gCell[sel].firstChild.options:false;
if( gCell[bol].width == "66%" && gCell[bol].innerHTML.match(/\((\d+)\ssub-boar(d|ds)\)/i) )
{
var Subs = parseInt(RegExp.$1);
var BoardName = gCell[bol].getElementsByTagName( "b" )[0].innerHTML;
gCell[bol].innerHTML.match(/Moderator/)? gCell[bol].appendChild( document.createElement('br') ):null;
gCell[bol].appendChild( document.createTextNode("Sub-Boards: ") );
for( var opl = 0 ; opl < Options.length ; opl ++ )
{
if( Options[opl].innerHTML.match(BoardName) )
{
for( var opl2 = Math.floor( opl + 1 ) ; opl2 < Math.floor( Math.floor( opl + Subs ) + 1 ) ; opl2 ++ )
{
var Link = document.createElement("a");
Link.href = Options[opl2].value;
Link.appendChild( document.createTextNode( Options[opl2].innerHTML.split(/-\s/)[1] ) );
gCell[bol].appendChild( Link );
( opl2 != Math.floor( opl + Subs) )?gCell[bol].appendChild( document.createTextNode(', ')):null;
}
}
}
}
}
}
}
}
</script>
Code preview: Click
Code placement: Main Footers
code creator: CrAzY_J
Code beta tester: hp_mad
<script type="text/javascript">
/* Sub Boards in board cell
created by CrAzY_J ( hatakeforum.proboards30.com )
Do not redistribute this code without the creator's permission*/
var gCell = document.body.getElementsByTagName( "td" );
if( this.location.href.match(/\.com(\/(index\.cgi(\?|#\w+)?)?)?$/))
{
for( var sel = 0 ; sel < gCell.length ; sel ++ )
{
for( var bol = 0 ; bol < gCell.length ; bol ++ )
{
if( gCell[sel].align == "right" && gCell[sel].firstChild.options)
{
var Options = ( gCell[sel].firstChild.options[0].innerHTML.match(/Forum\sJump/) )? gCell[sel].firstChild.options:false;
if( gCell[bol].width == "66%" && gCell[bol].innerHTML.match(/\((\d+)\ssub-boar(d|ds)\)/i) )
{
var Subs = parseInt(RegExp.$1);
var BoardName = gCell[bol].getElementsByTagName( "b" )[0].innerHTML;
gCell[bol].innerHTML.match(/Moderator/)? gCell[bol].appendChild( document.createElement('br') ):null;
gCell[bol].appendChild( document.createTextNode("Sub-Boards: ") );
for( var opl = 0 ; opl < Options.length ; opl ++ )
{
if( Options[opl].innerHTML.match(BoardName) )
{
for( var opl2 = Math.floor( opl + 1 ) ; opl2 < Math.floor( Math.floor( opl + Subs ) + 1 ) ; opl2 ++ )
{
var Link = document.createElement("a");
Link.href = Options[opl2].value;
Link.appendChild( document.createTextNode( Options[opl2].innerHTML.split(/-\s/)[1] ) );
gCell[bol].appendChild( Link );
( opl2 != Math.floor( opl + Subs) )?gCell[bol].appendChild( document.createTextNode(', ')):null;
}
}
}
}
}
}
}
}
</script>