|
Post by CD on Sept 10, 2005 21:46:59 GMT -8
Forums: ProBoards Version 4 Compatiblity: FF and IE 6.0 Location:Main Footers Description: This will add the text that you define into a board cell, followed by a list of all the sub-boards that the board has. Editing: Edit the first variable with the text you want to be shown before the sub-boards. Preview: none<script> // Sub-Boards in Board Cell by CDDude229 // Code may not be redistributed without permission from the creator.
var board_text = "<b>Sub-Boards:</b> "; // Text that will be shown before the actual sub-board listings
var aTD = document.getElementsByTagName("TD"); var aSE = document.getElementsByTagName("SELECT");
if(document.title.match(/ Home/i) && !location.href.match(/(action=(admin|view|modify)|board=)/i)){ for(a=0;a<aSE.length;a++){ if(aSE[a].innerHTML.match(/Forum Jump/i)){ var forumClass = aSE[a].options; break; } }
for(a=0;a<aTD.length;a++){ if(aTD[a].innerHTML.match(/board=/i) && aTD[a].width=="66%" && aTD[a].className.match(/windowbg/i) && aTD[a].innerHTML.match(/\((\d+) sub-boar(d|ds)\)/i)){ var boardName = aTD[a].getElementsByTagName("A")[0].href.split("board=")[1]; var subNum = parseInt(RegExp.$1); for(b=0;b<forumClass.length;b++){ if(forumClass[b].value.match(new RegExp("board="+boardName,"i"))){ for(c=1;c<=subNum;c++){ if(c==1){ aTD[a].innerHTML+="<br><font size='1'>"+board_text+"<a href='"+forumClass[b+c].value+"'>"+forumClass[b+c].innerHTML.split("--- ")[1]+"</a></font>"; } else { aTD[a].innerHTML +=", <font size='1'><a href='"+forumClass[b+c].value+"'>"+forumClass[b+c].innerHTML.split("--- ")[1]+"</a></font>"; } } } } if(!aTD[a].innerHTML.match(/i>Moderator/i)){ var aTDBR = aTD[a].getElementsByTagName("BR"); aTDBR[aTDBR.length-1].style.display ="none"; } aTD[a].innerHTML = aTD[a].innerHTML.replace(/\((\d+) sub-boar(d|ds)\)/i,""); } else if(aTD[a].innerHTML.match(/Info Center/i) && aTD[a].className == "bordercolor"){ break; } } } </script>
Last Edit: Sept 11, 2005 9:35:18 GMT -8 by CD
|
|