Post by Peter on Apr 29, 2006 13:32:58 GMT
Use "Split Posts v2" otherwise people won't be able to vote in polls
Doesn't allow header/base image, but it could be modified, I just got bored of doing this, so I decided it will do
Code goes into your global footer.
Just change the gap height variable in the top of the script.
<script type="text/javascript">
<!--
var iGapHeight = 25;
function separatePosts(){
var iTable = document.getElementsByTagName("table");
var iCell = document.getElementsByTagName("td");
var iRepHTML = '</table></td></tr></table><div style="height: ' + iGapHeight + 'px;"></div>';
iRepHTML += '<table class="bordercolor" cellSpacing="0" cellPadding="0" width="100%"><tr><td>';
iRepHTML += '<table cellSpacing="1" cellPadding="4" width="100%">';
for(t = 0; t < iTable.length; t ++){
if(iTable.item(t).width == "92%" && iTable.item(t).innerHTML.match(/javascript:popWindow/)){
iTable.item(t).id = "maintable";
break;
}
}
var ender = false;
var mainTable = document.getElementById("maintable");
for(c = 0; c < iCell.length; c ++){
if(iCell.item(c).width == "20%" && iCell.item(c).className.match(/windowbg/i) && iCell.item(c).align == "left" && iCell.item(c).innerHTML.match(/(member is|Guest)/)){
var pNode = iCell.item(c).parentNode;
var nComment = document.createComment("SPLITTER");
if(!ender){
var endRow = pNode.parentNode.rows.item(pNode.parentNode.rows.length - 2);
endRow.parentNode.insertBefore(nComment.cloneNode(true), endRow);
ender = true;
}
pNode.parentNode.insertBefore(nComment, pNode);
}
}
mainTable.parentNode.innerHTML = mainTable.parentNode.innerHTML.replace(/<!--SPLITTER-->/g, iRepHTML);
}
if(location.href.match(/action=display/i)){
separatePosts();
}
//-->
</script>
Doesn't allow header/base image, but it could be modified, I just got bored of doing this, so I decided it will do
Code goes into your global footer.
Just change the gap height variable in the top of the script.
<script type="text/javascript">
<!--
var iGapHeight = 25;
function separatePosts(){
var iTable = document.getElementsByTagName("table");
var iCell = document.getElementsByTagName("td");
var iRepHTML = '</table></td></tr></table><div style="height: ' + iGapHeight + 'px;"></div>';
iRepHTML += '<table class="bordercolor" cellSpacing="0" cellPadding="0" width="100%"><tr><td>';
iRepHTML += '<table cellSpacing="1" cellPadding="4" width="100%">';
for(t = 0; t < iTable.length; t ++){
if(iTable.item(t).width == "92%" && iTable.item(t).innerHTML.match(/javascript:popWindow/)){
iTable.item(t).id = "maintable";
break;
}
}
var ender = false;
var mainTable = document.getElementById("maintable");
for(c = 0; c < iCell.length; c ++){
if(iCell.item(c).width == "20%" && iCell.item(c).className.match(/windowbg/i) && iCell.item(c).align == "left" && iCell.item(c).innerHTML.match(/(member is|Guest)/)){
var pNode = iCell.item(c).parentNode;
var nComment = document.createComment("SPLITTER");
if(!ender){
var endRow = pNode.parentNode.rows.item(pNode.parentNode.rows.length - 2);
endRow.parentNode.insertBefore(nComment.cloneNode(true), endRow);
ender = true;
}
pNode.parentNode.insertBefore(nComment, pNode);
}
}
mainTable.parentNode.innerHTML = mainTable.parentNode.innerHTML.replace(/<!--SPLITTER-->/g, iRepHTML);
}
if(location.href.match(/action=display/i)){
separatePosts();
}
//-->
</script>