|
Post by Wormopolis on Feb 17, 2012 22:09:29 GMT -8
browsers tested: IE and FF placement: main footer
this will remove certain boards from showing up in the recent posts results. it does not fetch more results, so if 15 out 25 of the results match your board ids, then you will only see 10 results. that cannot be fixed.
<script type="text/javascript"> <!-- // remove posts from certain boards in recent // v1.0 // by Wormopolis - www.wormocodes.com // keep header intact var boardsToExclude='boardid1|boardid2|boardid3'; var hideNofNNresultText=true; //hides the 'result n of NN' text above each post
if (pb_action.match(/search2|recent/)) { var resCount=0; for (tds=document.getElementsByTagName('td'), tt=0; tt<tds.length; tt++) { if (tds[tt].className=='titlebg' && tds[tt].innerHTML.match(/(\d+) results found/i)) { var resHeadCell=tds[tt]; } if (tds[tt].className=='catbg' && tds[tt].width=='80%' && tds[tt].vAlign=='middle' && tds[tt].innerHTML.match(/Topic:/)) { var postTable=tds[tt].parentNode.parentNode.parentNode; postTable=postTable.parentNode.parentNode.parentNode.parentNode; if (hideNofNNresultText) { postTable.previousSibling.style.display='none'; postTable.previousSibling.previousSibling.style.display='none'; } resCount++; if (tds[tt].getElementsByTagName('a')[0] &&tds[tt].getElementsByTagName('a')[0].href.match(new RegExp('board=('+ boardsToExclude + ')&',''))) { postTable.style.display='none'; postTable.previousSibling.style.display='none'; postTable.previousSibling.previousSibling.style.display='none'; if (postTable.nextSibling) postTable.nextSibling.style.display='none'; if (postTable.nextSibling.nextSibling) postTable.nextSibling.nextSibling.style.display='none'; resCount--; } } } resHeadCell.innerHTML=resHeadCell.innerHTML.replace(/(\d+) results found/i,resCount + ' Result'+ (resCount==1 ? '' : 's') +' Found'); }
// --> </script>
|
|