Post by Chantry on Nov 4, 2007 22:30:57 GMT -5
Description: Divide the stickies in the same way as the announcements are.
Preview: Click
Compatibility: IE 6 and Firefox Tested
Comments: Simple, but usefull.
Location: Global Footers
Notes:
* READ CAREFULLY *
If you have custom images for the sticky icons, use code 2. In the code modify "var s = /sticky/i", and change it to part of the sticky image url. Make sure that whatever you use will not work the same for whatever image you have set for the non-sticky images. Make sure that it works for both the locked sticky and the normal sticky. If you can't find something that works for both, do the following:
var s = /(sticky|lockedsticky)/i
Modify it accordingly. Any questions, feel free to pm me, or ask here.
Code:
<script type="text/javascript">
<!--
for(var t = document.getElementsByTagName("td"), i = t.length-1, row, cell; i > -1; i--){
if(t.width == "5%" && t.className.match(/window/i) && t.align == "center" && t.firstChild.firstChild && t.firstChild.firstChild.src.match(/sticky/i)){
row = (t.previousSibling) ? t.parentNode.parentNode.parentNode.insertRow(t.parentNode.rowIndex + 1) : t.parentNode.parentNode.insertRow(t.parentNode.rowIndex + 1);
cell = row.insertCell(0);
cell.colSpan = (t.previousSibling) ? "8" : "7";
cell.className = "windowbg2";
cell.height = "5";
break;
}
}
//-->
</script>
Code 2:
<script type="text/javascript">
<!--
// Edit following line
var s = /sticky/i;
for(var t = document.getElementsByTagName("td"), i = t.length-1, row, cell; i > -1; i--){
if(t.width == "5%" && t.className.match(/window/i) && t.align == "center" && t.firstChild.firstChild && t.firstChild.firstChild.src.match(s)){
row = (t.previousSibling) ? t.parentNode.parentNode.parentNode.insertRow(t.parentNode.rowIndex + 1) : t.parentNode.parentNode.insertRow(t.parentNode.rowIndex + 1);
cell = row.insertCell(0);
cell.colSpan = (t.previousSibling) ? "8" : "7";
cell.className = "windowbg2";
cell.height = "5";
break;
}
}
//-->
</script>
Preview: Click
Compatibility: IE 6 and Firefox Tested
Comments: Simple, but usefull.
Location: Global Footers
Notes:
* READ CAREFULLY *
If you have custom images for the sticky icons, use code 2. In the code modify "var s = /sticky/i", and change it to part of the sticky image url. Make sure that whatever you use will not work the same for whatever image you have set for the non-sticky images. Make sure that it works for both the locked sticky and the normal sticky. If you can't find something that works for both, do the following:
var s = /(sticky|lockedsticky)/i
Modify it accordingly. Any questions, feel free to pm me, or ask here.
Code:
<script type="text/javascript">
<!--
for(var t = document.getElementsByTagName("td"), i = t.length-1, row, cell; i > -1; i--){
if(t.width == "5%" && t.className.match(/window/i) && t.align == "center" && t.firstChild.firstChild && t.firstChild.firstChild.src.match(/sticky/i)){
row = (t.previousSibling) ? t.parentNode.parentNode.parentNode.insertRow(t.parentNode.rowIndex + 1) : t.parentNode.parentNode.insertRow(t.parentNode.rowIndex + 1);
cell = row.insertCell(0);
cell.colSpan = (t.previousSibling) ? "8" : "7";
cell.className = "windowbg2";
cell.height = "5";
break;
}
}
//-->
</script>
Code 2:
<script type="text/javascript">
<!--
// Edit following line
var s = /sticky/i;
for(var t = document.getElementsByTagName("td"), i = t.length-1, row, cell; i > -1; i--){
if(t.width == "5%" && t.className.match(/window/i) && t.align == "center" && t.firstChild.firstChild && t.firstChild.firstChild.src.match(s)){
row = (t.previousSibling) ? t.parentNode.parentNode.parentNode.insertRow(t.parentNode.rowIndex + 1) : t.parentNode.parentNode.insertRow(t.parentNode.rowIndex + 1);
cell = row.insertCell(0);
cell.colSpan = (t.previousSibling) ? "8" : "7";
cell.className = "windowbg2";
cell.height = "5";
break;
}
}
//-->
</script>