Post by hpmad on Dec 25, 2005 18:56:33 GMT -8
updated and fixed a few bugs. added option to change cell widths - july 11, 2008 - hpmad
<script type="text/javascript">
/* HP's Board Mod v1.0 by hpmad
Do not repost or claim as your own
Without permission from creator */
var modStart = '[ '; // the beginning of the moderator display
var modEnd = ' ]'; // the end of the moderator display
var boardnameWidth = '25%'; //the width of the board name cell, in pixels or percent
var descriptionWidth = '60%'; //the width of the description cell, in pixels or percent
var threadspostsWidth = '10%'; //the width of the posts/threads cell, in pixels or percent
var onoffWidth = '5%'; //the width of the on/off button cell, in pixels or percent
var td = document.getElementsByTagName('td');
if(location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/)){
for(i=0;i<td.length;i++){
if(td.width=='66%'){
var moderators = td.innerHTML.match(/Moderator(s)?:/i) ? td.getElementsByTagName('i')[0].innerHTML:'Moderator: <i>none</i>';
var topics = td[i+1].getElementsByTagName('font')[0].innerHTML;
var posts = td[i+2].getElementsByTagName('font')[0].innerHTML;
var boardName = '<font size="1">[ '+td.getElementsByTagName('font')[0].innerHTML+' ]</font>';
var description = td.innerHTML.split(/<br\s?\/?>/i)[1];
if(td[i+3].getElementsByTagName('font')[0] && td[i+3].getElementsByTagName('font')[0].innerHTML.match(/<br\s?\/?>(.+?)<br\s?\/?>/i)){
var lastPostMem = RegExp.$1;
var lastPostMem = '<font size="1">'+lastPostMem+'</font>';
if(!td[i+3].getElementsByTagName('a')[0].href.match(/board=/i)){
var lastPostThread = '<font size="1"><a href="'+td[i+3].getElementsByTagName('a')[1].href+'">'+ td[i+3].getElementsByTagName('a')[1].innerHTML +'</a> by</font> ';
var lastPostDate = '<font size="1">('+td[i+3].innerHTML.split(/<br>/i)[0].split("on ")[1]+')</font>';
}else{
var lastPostThread = '<font size="1"><a href="'+td[i+3].getElementsByTagName('a')[0].href+'">'+ td[i+3].getElementsByTagName('a')[0].innerHTML +'</a> by</font> ';
var lastPostDate = '<font size="1">('+td[i+3].innerHTML.split(/<br>/i)[0].split("on ")[1]+')</font>';
}
}else{
var lastPostMem = '<i>none</i>';
var lastPostThread = '';
var lastPostDate = '';
}
var onoff = td[i-1].innerHTML;
td.innerHTML = '<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td width="'+boardnameWidth+'">'+boardName+'</td><td width="'+descriptionWidth+'">'+description+'</td><td rowspan="2"><font size="1">Threads: '+topics+'<br>Posts: '+posts+'</td><td valign="middle" rowspan="2" width="'+onoffWidth+'">'+onoff+'</td></tr><tr><td><font size="1">Last Post: '+lastPostThread+lastPostMem+'<br>'+lastPostDate+'</font></td><td><font size="1">'+modStart+moderators+modEnd+'</font></td></tr></table>';
td[i-1].style.display = 'none';
td.colSpan = '2';
}
if(td.width=='1%' && td[i+1].width=='1%'){
td.style.display = 'none';
td[i+1].style.display = 'none';
td[i+2].style.display = 'none';
}
if(td.className=='catbg' && td.colSpan=='5'){
td.colSpan = '1';
}
}
}
</script>
Main Footer
Preview
<script type="text/javascript">
/* HP's Board Mod v1.0 by hpmad
Do not repost or claim as your own
Without permission from creator */
var modStart = '[ '; // the beginning of the moderator display
var modEnd = ' ]'; // the end of the moderator display
var boardnameWidth = '25%'; //the width of the board name cell, in pixels or percent
var descriptionWidth = '60%'; //the width of the description cell, in pixels or percent
var threadspostsWidth = '10%'; //the width of the posts/threads cell, in pixels or percent
var onoffWidth = '5%'; //the width of the on/off button cell, in pixels or percent
var td = document.getElementsByTagName('td');
if(location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/)){
for(i=0;i<td.length;i++){
if(td.width=='66%'){
var moderators = td.innerHTML.match(/Moderator(s)?:/i) ? td.getElementsByTagName('i')[0].innerHTML:'Moderator: <i>none</i>';
var topics = td[i+1].getElementsByTagName('font')[0].innerHTML;
var posts = td[i+2].getElementsByTagName('font')[0].innerHTML;
var boardName = '<font size="1">[ '+td.getElementsByTagName('font')[0].innerHTML+' ]</font>';
var description = td.innerHTML.split(/<br\s?\/?>/i)[1];
if(td[i+3].getElementsByTagName('font')[0] && td[i+3].getElementsByTagName('font')[0].innerHTML.match(/<br\s?\/?>(.+?)<br\s?\/?>/i)){
var lastPostMem = RegExp.$1;
var lastPostMem = '<font size="1">'+lastPostMem+'</font>';
if(!td[i+3].getElementsByTagName('a')[0].href.match(/board=/i)){
var lastPostThread = '<font size="1"><a href="'+td[i+3].getElementsByTagName('a')[1].href+'">'+ td[i+3].getElementsByTagName('a')[1].innerHTML +'</a> by</font> ';
var lastPostDate = '<font size="1">('+td[i+3].innerHTML.split(/<br>/i)[0].split("on ")[1]+')</font>';
}else{
var lastPostThread = '<font size="1"><a href="'+td[i+3].getElementsByTagName('a')[0].href+'">'+ td[i+3].getElementsByTagName('a')[0].innerHTML +'</a> by</font> ';
var lastPostDate = '<font size="1">('+td[i+3].innerHTML.split(/<br>/i)[0].split("on ")[1]+')</font>';
}
}else{
var lastPostMem = '<i>none</i>';
var lastPostThread = '';
var lastPostDate = '';
}
var onoff = td[i-1].innerHTML;
td.innerHTML = '<table cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td width="'+boardnameWidth+'">'+boardName+'</td><td width="'+descriptionWidth+'">'+description+'</td><td rowspan="2"><font size="1">Threads: '+topics+'<br>Posts: '+posts+'</td><td valign="middle" rowspan="2" width="'+onoffWidth+'">'+onoff+'</td></tr><tr><td><font size="1">Last Post: '+lastPostThread+lastPostMem+'<br>'+lastPostDate+'</font></td><td><font size="1">'+modStart+moderators+modEnd+'</font></td></tr></table>';
td[i-1].style.display = 'none';
td.colSpan = '2';
}
if(td.width=='1%' && td[i+1].width=='1%'){
td.style.display = 'none';
td[i+1].style.display = 'none';
td[i+2].style.display = 'none';
}
if(td.className=='catbg' && td.colSpan=='5'){
td.colSpan = '1';
}
}
}
</script>
Main Footer
Preview