Post by ialex on Aug 26, 2007 1:37:33 GMT -8
This will place the moderators of a board into a new cell.
Edit the red text with what will appear in the cell when there are no moderators.
Preview: Click
Main Footer if you do not have sub-boards.
Global Footer if you do have sub-boards.
Cross Browser.
<script type="text/javascript">
<!--
/*Moderators in new cell - By iAlex - Open Source*/
var iTheNoMods="<i>None</i>";
if(location.href.match(/action=(home|change)/)||!location.href.match(/action/) && !document.postForm && !document.modifyForm){
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 iExTd=iTd.item(i+1).cloneNode(true);
iExTd.width='10%';
iExTd.innerHTML=(iTd.item(i).innerHTML.match(/i>Moderator(s)?: (.+?)<\/i><\/f/i))? RegExp.$2 : iTheNoMods;
iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/<br\s?\/?><i>Moderator(s)?: (.+?)<\/i>/i,'');
iExTd.align='center';
iTd.item(i).width='56%';
iTd.item(i).parentNode.insertBefore(iExTd,iTd.item(i+1));
}
if(iTd.item(i).className.match(/catbg/) && iTd.item(i).colSpan=="5"){
iTd.item(i).colSpan='6';
}
if(iTd.item(i).className.match(/titlebg/) && iTd.item(i).innerHTML.match(/>(Forum Name|Sub-Boards)</) && iTd.item(i).colSpan=="2"){
iTd.item(i).width='64%';
var iExTi=iTd.item(i+1).cloneNode(true);
iExTi.width='10%';
iExTi.firstChild.firstChild.innerHTML='Moderators';
iTd.item(i).parentNode.insertBefore(iExTi,iTd.item(i+1));
}
}
}
//-->
</script>
Edit the red text with what will appear in the cell when there are no moderators.
Preview: Click
Main Footer if you do not have sub-boards.
Global Footer if you do have sub-boards.
Cross Browser.
<script type="text/javascript">
<!--
/*Moderators in new cell - By iAlex - Open Source*/
var iTheNoMods="<i>None</i>";
if(location.href.match(/action=(home|change)/)||!location.href.match(/action/) && !document.postForm && !document.modifyForm){
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 iExTd=iTd.item(i+1).cloneNode(true);
iExTd.width='10%';
iExTd.innerHTML=(iTd.item(i).innerHTML.match(/i>Moderator(s)?: (.+?)<\/i><\/f/i))? RegExp.$2 : iTheNoMods;
iTd.item(i).innerHTML=iTd.item(i).innerHTML.replace(/<br\s?\/?><i>Moderator(s)?: (.+?)<\/i>/i,'');
iExTd.align='center';
iTd.item(i).width='56%';
iTd.item(i).parentNode.insertBefore(iExTd,iTd.item(i+1));
}
if(iTd.item(i).className.match(/catbg/) && iTd.item(i).colSpan=="5"){
iTd.item(i).colSpan='6';
}
if(iTd.item(i).className.match(/titlebg/) && iTd.item(i).innerHTML.match(/>(Forum Name|Sub-Boards)</) && iTd.item(i).colSpan=="2"){
iTd.item(i).width='64%';
var iExTi=iTd.item(i+1).cloneNode(true);
iExTi.width='10%';
iExTi.firstChild.firstChild.innerHTML='Moderators';
iTd.item(i).parentNode.insertBefore(iExTi,iTd.item(i+1));
}
}
}
//-->
</script>