Post by teestorms on Aug 11, 2008 9:09:02 GMT -8
I am using the following code which inserts links to all my subboards on their parent boards.
The problem is that is also lists how many subboards there are, and I don't wont that to show. If I go into General Options and turn off that feature, however, it will cause the links for the subboards to disappear as well.
Is there a way that I can still have the links for the subboards show on the parent boards without also listing how many subboards there are within that board?
The problem is that is also lists how many subboards there are, and I don't wont that to show. If I go into General Options and turn off that feature, however, it will cause the links for the subboards to disappear as well.
Is there a way that I can still have the links for the subboards show on the parent boards without also listing how many subboards there are within that board?
[<script type="text/javascript">
/* Sub Boards in board cell
created by CrAzY_J ( http://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+|\?(action=home)?)?)?)?$/))
{
for( var sel = gCell.length-1 ; sel > 0 ; sel -- )
{
for( var bol = 0 ; bol < gCell.length ; bol ++ )
{
if( gCell[sel].align == "right" && gCell[sel].firstChild.options)
{
var Options = ( gCell[sel].firstChild.options[2].value.match(/\/index\.cgi$/) )? gCell[sel].firstChild.options:false;
if( gCell[bol].width == "66%" && gCell[bol].innerHTML.match(/\((\d+)\ssub-boar(d|ds)\)/i) )
{
var BoardName = gCell[bol].getElementsByTagName( "b" )[0].innerHTML;
var Subs = parseInt(RegExp.$1);
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( new RegExp('^-\\s'+BoardName+'$','').test(Options[opl].innerHTML ))
{
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].replace(/&/gi, '&') ) );
gCell[bol].appendChild( Link );
( opl2 != Math.floor( opl + Subs) )?gCell[bol].appendChild( document.createTextNode(', ')):null;
}
}
}
}
}
}
}
}
</script>