Post by Hechizero on Apr 12, 2005 2:32:45 GMT
Script Name: Separate Sticky Threads
Description: Separate the sticky threads from the normal threads.
Version: 1.0
Board Footers:
Search at the top for this part:
var StickyImages=['sticky.gif','stickylock.gif'];
var PollImages=['poll_icon.gif','poll_icon_closed.gif'];
var SectionsName=['Board Topics','Important Topics'];
var gapSize='15px';
Edit the two red words with the name (not the complete url!) of the sticky and locked sticky thread icons. Edit the two blue words with the name of the poll and locked poll thread icons. Edit the two green words with the name of the normal threads and sticky threads that you want to display in the 'Subject' line. Edit the brown part with the size of the gap between the sticky topics and the normal topics.
Description: Separate the sticky threads from the normal threads.
Version: 1.0
Board Footers:
<script type="text/javascript">
/* Created by Hechizero
Separate Sticky Threads v1.0
This code may not redistributed without the express permission from its creator.
This header must stay intact at all times. */
var StickyImages=['sticky.gif','stickylock.gif'];
var PollImages=['poll_icon.gif','poll_icon_closed.gif'];
var SectionsName=['Board Topics','Important Topics'];
var gapSize='15px';
var tables=document.getElementsByTagName('table');
var ImgPattern=/\/(\w+\.\w+)$/i
for (var h=0;h<tables.length;h++) {
if (tables[h].width=='100%' && tables[h].cellSpacing=='1' && tables[h].cellPadding=='4' && tables[h].rows[0].cells[0].colSpan=='2') {
originalTable=tables[h].parentNode.parentNode.parentNode.parentNode;
cloneTable=tables[h].parentNode.parentNode.parentNode.parentNode.cloneNode(true);
originalTargetTable=tables[h];
cloneTargetTable=cloneTable.getElementsByTagName('table')[0];
for (var e=originalTargetTable.rows.length-1;e>0;e--) {
var currentImg=ImgPattern.exec(originalTargetTable.rows[e].cells[0].getElementsByTagName('img')[0].src)[1];
if (currentImg==StickyImages[0] || currentImg==StickyImages[1]) {
originalTargetTable.deleteRow(e);
} else if (currentImg==PollImages[0] || currentImg==PollImages[1]) {
var nextImg=ImgPattern.exec(originalTargetTable.rows[e-1].cells[0].getElementsByTagName('img')[0].src)[1]
if (nextImg==StickyImages[0] || nextImg==StickyImages[1]) {
originalTargetTable.deleteRow(e);
} else {
cloneTargetTable.deleteRow(e);
}
} else {
cloneTargetTable.deleteRow(e);
}
}
originalTargetTable.rows[0].cells[1].getElementsByTagName('b')[0].innerHTML=SectionsName[0];
if (cloneTargetTable.rows.length>1) {
cloneTargetTable.rows[0].cells[1].getElementsByTagName('b')[0].innerHTML=SectionsName[1];
var gapTag=document.createElement('div');
gapTag.style.height=gapSize;
originalTable.parentNode.insertBefore(gapTag,originalTable);
gapTag.parentNode.insertBefore(cloneTable,gapTag);
}
break;
}
}
</script>
Search at the top for this part:
var StickyImages=['sticky.gif','stickylock.gif'];
var PollImages=['poll_icon.gif','poll_icon_closed.gif'];
var SectionsName=['Board Topics','Important Topics'];
var gapSize='15px';
Edit the two red words with the name (not the complete url!) of the sticky and locked sticky thread icons. Edit the two blue words with the name of the poll and locked poll thread icons. Edit the two green words with the name of the normal threads and sticky threads that you want to display in the 'Subject' line. Edit the brown part with the size of the gap between the sticky topics and the normal topics.