|
test123
Jan 27, 2012 16:24:00 GMT -4
Post by MonsterControl on Jan 27, 2012 16:24:00 GMT -4
<script type="text/javascript"> <!-- (function(){ /*Stacked Boards Listings (Global Footer) */ var maxCols=3; //maximum number of boards per row var wideBoards=[]; //List of boards that should get a full row with full data display (topics, description, etc.) var hideBoards=[]; //List of boards to skip var tabCompatMode=false; //make compatible with tabulate main page code (install in main footer above tabulate code) var autoWiden=true;
var tbl=document.createElement('table').insertRow(-1).parentNode; var tBod=document.getElementsByTagName('tbody'),a,aa,b,bb,bbb,c,d,e; var mainTitle=["Forum Name","Sub-Boards"]; function sizeCols(){ var d,z; if(b && b.cells && b.cells[0]){ d=parseInt(100/maxCols); for(e=0;e<b.cells.length;e++){ if(!b.cells[e].nextSibling){ if(e==0 && (autoWiden ||(z=b.cells[e].getElementsByTagName('a')) && z[0] && z[0].href.match(wideBoard))){ bbb.style.display=''; bb.firstChild.innerHTML=bb.firstChild.innerHTML.replace(/<br\s*\/?>/ig,' '); z=bb.firstChild.firstChild.style; z.display='';z.cssFloat=z.styleFloat='right'; bb.firstChild.firstChild.innerHTML=bb.firstChild.firstChild.innerHTML.replace(/,/ig,''); } b.cells[e].width=bb.cells[e].width=bbb.cells[e].width=(100-((b.cells.length-1)*d))+'%'; }else{ b.cells[e].width=bb.cells[e].width=bbb.cells[e].width= ''+d+'%'; } } } } function addCols(){ sizeCols(); b=tBod[a].insertRow(c.rowIndex).insertCell(-1).appendChild(document.createElement('table')).insertRow(-1); b.offsetParent.style.cssText="width:100%;padding:0px;"; b.className="mediumtitlewrapper"; bb=b.parentNode.insertRow(-1); bb.className="row4wrapper"; bbb=b.parentNode.insertRow(-1); bbb.style.display="none"; bbb.className="row6wrapper"; var z=tBod[a].rows[c.rowIndex-1]; z.firstChild.colSpan=c.cells.length; z.firstChild.className='cattext windowbg2'; } function ohtml(o){return o.outerHTML?o.outerHTML:(document.createElement('div')).appendChild(o.cloneNode(-1)).parentNode.innerHTML;} function itext(o){return (("innerText" in o)?o.innerText:o.textContent)} function a2re(a){var r=/\.\./;if(a.length)r=new RegExp('\\bboard=('+a.join('|')+')\\b','i'); return r} if(pb_action.match(/^(home|boardindex)$/)){ var wideBoard=a2re(wideBoards), hideBoard=a2re(hideBoards),x,y,z; for(var a=tBod.length-1,wide=false,w;a>0;a--){ if((aa=tBod[a].rows[0].cells[0]) && aa.className=='titlebg' && aa.lastChild && aa.lastChild.innerHTML && aa.lastChild.innerHTML.match(new RegExp(">("+mainTitle.join('|')+")<","i"))){ while(aa.nextSibling){aa.nextSibling.style.display="none";aa.parentNode.firstChild.colSpan++;aa=aa.nextSibling;} c=tBod[a].rows[1]; if(c.cells[0]&&c.cells[0].className!='catbg') addCols(); while(c){ if(c.cells[0]){ if( !c.innerHTML.match(/mouseOverHighlightCellB?\(/)){ if(/action=markallboardsread/.test(c.innerHTML)){sizeCols();break;} c=c.nextSibling; continue; }else{ if(c.previousSibling.cells[0].className=='catbg' && c.previousSibling.cells[0].offsetWidth)addCols(); } }else{c.style.display="none";c=c.nextSibling; continue;} z=(c.cells[1] && (x=c.cells[1].getElementsByTagName('a')) && x[0])? x[0]:{href:''}; if(z.href.match(hideBoard)){c=c.nextSibling;if(tabCompatMode){tbl.appendChild(c.previousSibling); }else{ c.previousSibling.style.display='none';} continue;} if(z.href.match(wideBoard)){wide=true; if(b.cells.length>0)addCols();}else{wide=false;} d=b.insertCell(-1); d.className='windowbg2 mediumtitle'; d.innerHTML=ohtml(c.cells[1].getElementsByTagName('b')[0].parentNode); d=bb.insertCell(-1); d.className='windowbg row4'; x=itext(c.cells[2]).match(/(\d[\d,]*)/)[1].replace(/,/g,''); y=itext(c.cells[3]).match(/(\d[\d,]*)/)[1].replace(/,/g,''); z=itext(c.lastChild).replace(/[\s\n\r]/g,''); d.innerHTML= '<div style="display:none;" >'+x+' topics & '+y+' posts</div>last post:<br>'+ (z.length?c.lastChild.innerHTML:'--'); d.innerHTML=d.innerHTML.replace(/\b1\s(Topics|Posts)/g,function(m,p){return '1 '+p.replace(/s$/,'')}) d=bbb.insertCell(-1); d.className='windowbg2 row6'; d.innerHTML='<font size="1">'+c.cells[1].innerHTML.split(/<font size=['"]?1['"]?>/i).pop(); z=c;y=z.rowIndex; c=c.nextSibling; if(tabCompatMode){ tbl.appendChild(z); if(tBod[a].rows[y-1].cells[0].className!='windowbg'){ x=tBod[a].rows[y-1].insertCell(0); x.className='windowbg'; x.style.display='none'; } }else z.style.display="none"; if(!c){ sizeCols();break; }else if(c.innerHTML.match(/pb_bubble/)){ if(wide){wide=false;addCols(); }else if(b.cells.length>=maxCols){addCols();} } } } } } })() // --> </script>
|
|