Post by acoolie530 on Feb 28, 2005 14:46:46 GMT
Name: acoolie board modification v2.02 (minor bugfixes)
Compatibility: Firefox/IE
Preview: Here
Placement: Main Footer
Notes: Completely revamps the board cell. On/off connected to board cell. Posts + topics combined to articles and moved to far right. Moderators: changed to Moderated By:. Last post moved underneath board name.
Edit: If you use italics anywhere in your board name or description, change the 0 in this line to how many times you used italics:
var mods = td[h+1].getElementsByTagName("i")[0].innerHTML;
Update (03/04/05): The code will now remove "Moderators: None"
Compatibility: Firefox/IE
Preview: Here
Placement: Main Footer
Notes: Completely revamps the board cell. On/off connected to board cell. Posts + topics combined to articles and moved to far right. Moderators: changed to Moderated By:. Last post moved underneath board name.
<script type="text/javascript">
<!--
/* Board Modification v2 by acoolie
Please leave this header intact
Do not redistribute or claim this code as your own
*/
//Replace with Cell highlight color
var highColor = "#Cell highlight color";
//No more editting
var fon = document.getElementsByTagName("font");
for(var j=0;j<fon.length;j++){
if(fon[j].parentNode.width=="66%" && fon[j].innerHTML.match(/board=(.+?)></i) && !fon[j].innerHTML.match(/Moderator/i)){
fon[j].parentNode.onmouseover = function high(){
this.style.backgroundColor = highColor;
window.status = this.getElementsByTagName("b")[0].innerHTML
this.style.cursor = (navigator.appName.match(/microsoft/i))? "hand" : "pointer";
}
fon[j].parentNode.onmouseout = function high(){
this.style.cursor = "";
window.status = "";
this.style.backgroundColor = "";
}
fon[j].parentNode.onclick = function test(){
location.href = this.getElementsByTagName("a")[0].href;
}
}
}
var td = document.getElementsByTagName("td");
for(var h=0;h<td.length;h++){
if(td[h].width=="8%" && td[h].vAlign=="top" && td[h].className=="windowbg"){
if(td[h+1].width=="66%" && td[h+1].className=="windowbg2" && td[h+1].align=="left"){
var name = td[h+1].getElementsByTagName("font")[0].innerHTML;
var descr = td[h+1].innerHTML.split("<b"+"r>")[1];
if(navigator.appName.match(/Microsoft/i)){
var descr = td[h+1].innerHTML.split("<B"+"R>")[1];
}
var posts = (td[h+2].innerHTML.match(/>(\d+)/)) ? RegExp.$1 : false;
var topics = (td[h+3].innerHTML.match(/>(\d+)/)) ? RegExp.$1 : false;
var last = td[h+4].innerHTML.split(/by\s/i)[1];
var on = td[h+4].innerHTML.split(/by\s/i)[0];
var article = Math.floor(posts) + Math.floor(topics);
td[h].style.display = "none";
td[h+2].innerHTML = article
td[h+3].style.display = "none";
td[h+4].style.display = "none";
var mods = td[h+1].getElementsByTagName("i")[0].innerHTML;
mods = mods.replace(/Moderator:|Moderators:/i,"Moderated By:")
if(mods.match(/None/i)){
mods = ""
}
td[h+1].innerHTML="<table width='100%' height='32' cellpadding='0' cellspacing='0' border='0'><tr><td valign='middle' width='4%'>"+td[h].innerHTML+"<td valign='middle' width='34%' style='padding-left: 5px;'>"+name+"<br/><font size='1'>Last post by <b>"+last+"</b> on "+on+"</font></td><td valign='middle' align='right'><font size='1'>"+descr+"<br/>"+mods+"</font></td></tr></table>"
}
}
}
for(var y=0;y<td.length;y++){
if(td[y].className=="titlebg"){
if(td[y].innerHTML.match(/Topics/i)){
td[y].style.display = "none"
td[y+1].style.display = "none"
td[y+2].style.display = "none"
td[y-1].innerHTML = "<table align='left'><font color='text1' size='2'><b>Forum Name</b></font></table><table align='right'><font color='text1' size='2'><b>Posts</b></font></table>"
}
}
}
//-->
</script>
Edit: If you use italics anywhere in your board name or description, change the 0 in this line to how many times you used italics:
var mods = td[h+1].getElementsByTagName("i")[0].innerHTML;
Update (03/04/05): The code will now remove "Moderators: None"