#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on May 2, 2006 12:50:27 GMT -8
This will reverse the order of posts within a thread, so that the latest post is at the top of the first page and working down..
Put it in your Global Footer..
<script type="text/javascript"> <!-- /* Reverse order posts in threads by Todge Copyright © 2006 Please keep this header intact */
if(document.location.href.match('board=')&&!document.location.href.match('action=')) { var thread = document.getElementsByTagName('td'); var threadLinks;
for(t=0; t<thread.length; t++) { if(thread[t].className=='windowbg'&&thread[t].style.cursor=='pointer') { threadLinks=thread[t].getElementsByTagName('a');
if(threadLinks[0].firstChild.nodeName=='IMG') { threadLinks[1].href = threadLinks[0].href; } else { threadLinks[0].href = threadLinks[threadLinks.length-1].href; }
thread[t].onclick = function(){document.location.href = this.getElementsByTagName('a')[0].href;} }}}
if(document.location.href.match('action=display')) { var p=0; var postTR = new Array(); var newTR = new Array(); var TD = document.getElementsByTagName('TD'); for(t=0; t<TD.length; t++) { if(TD[t].width=='20%' && TD[t].align=='left' && TD[t].className.match('windowbg')) { postTR[p] = TD[t].parentNode; newTR[p] = postTR[p].cloneNode(true); p++; }} var p=0; for(t=postTR.length-1; t>-1; t--) { postTR[t].parentNode.replaceChild(newTR[p],postTR[t]); p++; }} // --> </script>
Fixed (yet again) to work in ProBoards new layout...
|
|