Post by Ross on Dec 31, 2005 21:38:48 GMT -5
This is just a basic sticky thread divider which seperates the announcements and stickies from the normal threads with a copy of the 'Subject' Bar. It also removes the row between any announcements and normal sticky threads
To edit, replace the red words with what you want to call the sticky threads. The blue words, are the names of your sticky/sticky lock images. So long as both images contain those words, you shouldn't need to edit it.
Global Footer
<script type="text/javascript">
<!--
/* sticky thread divider - by ross */
var stickyText = 'Important Topics';
var iRe = /(sticky|stickylock)(.+?)?\.(png|gif|jpe?g)/i;
// No need to edit below
var t = 0;
var r = 1;
var y = (document.ammForm)? 1 : 0;
var tr = document.getElementsByTagName('tr');
for(i=0; i<tr.length; i++) {
if(tr.item(i).cells.length == (y+7)) {
if(tr.item(i).cells.item(0).className == 'catbg' && tr.item(i).cells.item(y+2).innerHTML.match(/Subject/)) {
t = i;
var iRow = tr.item(i).cloneNode(true)
}
else if(tr.item(i).cells.item(0).className == 'windowbg2' && tr.item(i).cells.item(y+2).width.match(/^4(3|8)%$/)) {
if((tr.item(i+1).cells.item(0).colSpan == (y+7) && tr.item(i+1).cells.item(0).height == '5')) {
tr.item(i+1).style.display = 'none';
r++;
}
if(tr.item(i).getElementsByTagName('img').item(0).src.match(iRe) && tr.item(i+1).cells.item(0).height != '5' && !tr.item(i+1).getElementsByTagName('img').item(0).src.match(iRe)) {
tr.item(i).parentNode.insertBefore(iRow, tr.item(i+1));
tr.item(t).cells.item(y+2).firstChild.innerHTML = stickyText
break;
}
}
}
}
//-->
</script>
To edit, replace the red words with what you want to call the sticky threads. The blue words, are the names of your sticky/sticky lock images. So long as both images contain those words, you shouldn't need to edit it.
Global Footer
<script type="text/javascript">
<!--
/* sticky thread divider - by ross */
var stickyText = 'Important Topics';
var iRe = /(sticky|stickylock)(.+?)?\.(png|gif|jpe?g)/i;
// No need to edit below
var t = 0;
var r = 1;
var y = (document.ammForm)? 1 : 0;
var tr = document.getElementsByTagName('tr');
for(i=0; i<tr.length; i++) {
if(tr.item(i).cells.length == (y+7)) {
if(tr.item(i).cells.item(0).className == 'catbg' && tr.item(i).cells.item(y+2).innerHTML.match(/Subject/)) {
t = i;
var iRow = tr.item(i).cloneNode(true)
}
else if(tr.item(i).cells.item(0).className == 'windowbg2' && tr.item(i).cells.item(y+2).width.match(/^4(3|8)%$/)) {
if((tr.item(i+1).cells.item(0).colSpan == (y+7) && tr.item(i+1).cells.item(0).height == '5')) {
tr.item(i+1).style.display = 'none';
r++;
}
if(tr.item(i).getElementsByTagName('img').item(0).src.match(iRe) && tr.item(i+1).cells.item(0).height != '5' && !tr.item(i+1).getElementsByTagName('img').item(0).src.match(iRe)) {
tr.item(i).parentNode.insertBefore(iRow, tr.item(i+1));
tr.item(t).cells.item(y+2).firstChild.innerHTML = stickyText
break;
}
}
}
}
//-->
</script>