|
Post by MonsterControl on Feb 15, 2012 0:25:39 GMT -4
<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[i].width=='66%'){ var moderators = td[i].innerHTML.match(/Moderator(s)?:/i) ? td[i].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[i].getElementsByTagName('font')[0].innerHTML+' ]</font>'; var description = td[i].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[i].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[i].colSpan = '2'; }
if(td[i].width=='1%' && td[i+1].width=='1%'){ td[i].style.display = 'none'; td[i+1].style.display = 'none'; td[i+2].style.display = 'none'; }
if(td[i].className=='catbg' && td[i].colSpan=='5'){ td[i].colSpan = '1'; } } } </script>
Read more: http://smangii.proboards.com/index.cgi?board=pbsupport&action=display&thread=12119#ixzz1mQB3ahcQ
|
|