Post by Peter on Oct 31, 2004 18:34:21 GMT
Created by Hechizero
Script Name: Reverse Posts
Description: Reverses the posts when viewing a thread.
Hack Type: Thread-Enable & Topic-Enable
Version: 1.1
Previews: ---
All Boards Footers:
How to Customize it?:
1. Enabling the reverse of posts in thread
If you want the posts of the thread in a board to be reversed just change for this part on the script:
var ReversePosts='no'; //Change to 'yes' if you want to reverse the posts in a thread
and replace the red part with the word yes.
2. Enabling the reverse of a thread page links
If you want to reverse the links, that means, if you want the member to be redirected to the latests posts by clicking on the page #1, search for this part on the script:
var ReverseTopicLinks='no'; // Change to 'yes' if you want to reverse the thread page links
and replace the red part with the word yes.
Notes:
1- When you are viewing a thread and you enabled the reversing of page links the links on the top and bottom are also reversed. Because when you're viewing a page that page number is not turned to a link that can cause some small problems because maybe the only provided link redirect you to the same page that you're viewing.
2- The script doesn't work on Mozilla. I'll try to fix that problem as soon as posible.
Location: All Boards Footers.#nosmileys
Script Name: Reverse Posts
Description: Reverses the posts when viewing a thread.
Hack Type: Thread-Enable & Topic-Enable
Version: 1.1
Previews: ---
All Boards Footers:
<script language="javascript" type="text/javascript">
/* Created by Hechizero - http://www.hechizero.com
Reverse Posts v1.1
This code may not redistributed without the express permission from its creator.
This header must stay intact at all times. */
var ReversePosts='no'; //Change to 'yes' if you want to reverse the posts in a thread
var ReverseTopicLinks='no'; // Change to 'yes' if you want to reverse the thread page links
if (location.href.indexOf('action=display')!=-1) {var tables=document.getElementsByTagName('table');var reversedPosts=document.createDocumentFragment();
for (var h=0,i=true;h<tables.length;h++) {if (tables[h].width=='92%' && tables[h].className!='bordercolor' && tables[h].cellSpacing=='0') {var hijos=tables[h].rows[0].cells[0].childNodes;
for (var e=hijos.length-1;e>=0;e--) {var s=hijos[e];
if (s.nodeType==1 && s.tagName=='TABLE' && s.cellSpacing=='0' && s.cellPadding=='0' && s.width=='100%' && s.rows[0].cells[0].firstChild.tagName=='TABLE') {if (ReversePosts.match(/^yes$/i) && s.className=='bordercolor' && s.align=='center' && s.rows[0].cells[0].firstChild.rows[0].cells[0].className.match(/windowbg/i)) { reversedPosts.appendChild(hijos[e]);} else {if (s.rows[0].cells[0].firstChild.rows[0].cells[0].className=='titlebg' && s.rows[0].cells[0].firstChild.rows[0].cells[0].width=='100%') {if (i) {var BeforeMe=s;i=false;}
if (ReverseTopicLinks.match(/^yes$/i)) {var pagtile=s.rows[0].cells[0].firstChild.rows[0].cells[0].firstChild.rows[0].cells[0].firstChild;var paginas_a=pagtile.getElementsByTagName('a');var paginas_b=pagtile.getElementsByTagName('b');
if (paginas_a.length>0 && (parseInt(paginas_a[paginas_a.length-1].firstChild.firstChild.data)>parseInt(paginas_b[paginas_b.length-1].firstChild.data))) {var allpages=paginas_a[paginas_a.length-1].firstChild.firstChild.data;} else {var allpages=paginas_b[paginas_b.length-1].firstChild.data;}
for (var c=0;c<paginas_a.length;c++) {paginas_a[c].href=paginas_a[c].href.split('&start=')[0]+'&start='+((allpages-paginas_a[c].firstChild.firstChild.data)*15);}}}}}}
break;}}
BeforeMe.parentNode.insertBefore(reversedPosts,BeforeMe);}
if (location.href.indexOf('action=')==-1 && ReverseTopicLinks.match(/^yes$/i)) {var trs=document.getElementsByTagName('tr');
for (var h=0;h<trs.length;h++) {if (trs[h].cells[2] && trs[h].cells[2].className=='windowbg' && trs[h].cells[2].width=='48%') {var pages=trs[h].cells[2].getElementsByTagName('a');
for (var e=1;e<pages.length;e++) {pages[e].href=pages[e].href.split('&start=')[0]+'&start='+((pages.length-e-1)*15);}}}}
</script>
How to Customize it?:
1. Enabling the reverse of posts in thread
If you want the posts of the thread in a board to be reversed just change for this part on the script:
var ReversePosts='no'; //Change to 'yes' if you want to reverse the posts in a thread
and replace the red part with the word yes.
2. Enabling the reverse of a thread page links
If you want to reverse the links, that means, if you want the member to be redirected to the latests posts by clicking on the page #1, search for this part on the script:
var ReverseTopicLinks='no'; // Change to 'yes' if you want to reverse the thread page links
and replace the red part with the word yes.
Notes:
1- When you are viewing a thread and you enabled the reversing of page links the links on the top and bottom are also reversed. Because when you're viewing a page that page number is not turned to a link that can cause some small problems because maybe the only provided link redirect you to the same page that you're viewing.
2- The script doesn't work on Mozilla. I'll try to fix that problem as soon as posible.
Location: All Boards Footers.#nosmileys