Post by wormopolis on Jul 7, 2010 23:08:39 GMT -6
Browser tested: IE and FF
placement: Div goes wherever you want it, main code goes in Global footer.
Moves the navigation bar above the boards to anywhere you want them to be in a new "ladder style" format.
Put a DIV tag anywhere you want the navbar to end up:
if you want it to FLOAT like what you see to the left, then put THIS code in your global header:
This part goes in Global Footer:
Preview: www.wormocodes.com
placement: Div goes wherever you want it, main code goes in Global footer.
Moves the navigation bar above the boards to anywhere you want them to be in a new "ladder style" format.
Put a DIV tag anywhere you want the navbar to end up:
<div id="nvtree"></div>
if you want it to FLOAT like what you see to the left, then put THIS code in your global header:
<style type="text/css">
#floatNav {top: expression( ( ignoreMe = document.body.scrollTop +20 ) + 'px' ); z-index: 50;}
</style>
<div width="10%" id="floatNav">
<table cellspacing="1" cellpadding="0" border="0" align="left" valign="top" width="120" bgcolor="0066FF" class="bordercolor">
<tr><td>
<table border="0" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td align="left" valign="top" class="welcomebg" bgcolor="000000">
<div valign="top" id="nvtree"></div>
</td>
</tr>
</table>
</td></tr></table></div>
<script type="text/javascript">
<!--
function floatNav() {
nv=document.getElementById('floatNav');
nv.style.position=(document.all ? 'absolute' : 'fixed');
nv.style.top=document.body.scrollTop +20;
document.body.insertBefore(nv, document.body.firstChild);
}
floatNav();
-->
</script>
This part goes in Global Footer:
<script type="text/javascript">
<!--
// Move nav tree to anywhere
// by Wormopolis wormocodes.proboards.com
// Do not repost - keep header intact
// version 3.011
var horizSpace="-";
var endSpace=">";
var vertSpace="|";
var displayType=1; // 1=normal, 2=Kamistyle (non-ladder), 3=vBulletin style
var direction="left"; //choose left or right, vBulletin style requires left
vBullIconTop="http://i36.tinypic.com/334qcf7.gif";
vBullIconBottom="http://i37.tinypic.com/2v3jzgx.gif";
// insert a DIV tag with id="nvtree" where you want tree to be
if (!location.href.match(/noNav/)) {
iTd=document.getElementsByTagName('td');
for (i=0; i<iTd.length; i++) {
if (iTd[i].width=="100%" && iTd[i].getElementsByTagName('a')[0] && iTd[i].getElementsByTagName('a')[0].className=="nav") {
sts=iTd[i].getElementsByTagName('a')[0];
workwith=sts.parentNode; if (location.href.match(/navdebug/)) alert(workwith.innerHTML);
breakoff_a=workwith.innerHTML.split(/<table/i)[0];
if (breakoff_a.match(/<font/i)) breakoff_a=breakoff_a.split(/<font/i)[0];
breakoff_a=" "+breakoff_a; if (location.href.match(/navdebug/)) alert(breakoff_a);
breakoff_b = (document.all ? breakoff_a.split(/<br(.*?)>/i)[1] : breakoff_a.split(/<br(.*?)>/i)[2]);
asd=0; jm=0; if (location.href.match(/navdebug/)) alert(breakoff_b);
while (!workwith.childNodes[jm].nodeName.match(/(table|form)/i)){
if (workwith.childNodes[jm].nodeType==3) {
workwith.childNodes[jm].nodeValue= "";
} else {
if (!workwith.childNodes[jm].nodeName.match(/(div|br)/i)) workwith.childNodes[jm].style.display="none";
}
jm++;
}
breakoff_b = " " + breakoff_b;
nav_list=breakoff_b.split("::");
deep=nav_list.length;
for (j=(displayType==3 ? 1 : 0);j<deep-1;j++) {
nav_list[j]=(direction=='left' ? endSpace+nav_list[j]+(displayType==3 ? "" : "<br>") : nav_list[j]+endSpace);
}
nav_list[deep-1]=(direction=='left' ? (displayType==3 ? '<img src="'+vBullIconBottom+'" border="0"><b><font size="2">' : endSpace)+nav_list[deep-1]+(displayType==3 ? "</font></b>" : "" ) + "<br>" : nav_list[deep-1]+endSpace);
nav_post_final=(displayType==3 ? '<img src="'+vBullIconTop+'" border="0">' : "");
for (k=0;k<deep-1;k++) {
if (direction=='left') {
if (displayType!=3) {
for (sp=0; sp<k; sp++) nav_post_final+=horizSpace;
}
nav_post_final+=nav_list[k];
} else {
nav_post_final+=nav_list[k];
if (displayType!=3) {
for (sp=0; sp<k; sp++) nav_post_final+=horizSpace;
nav_post_final+="<br>";
}
}
if (displayType!=3) nav_post_final+=vertSpace+"<br>";
}
if (displayType!=3) {
if (direction=='left') {
for (sp=0; sp<k; sp++) nav_post_final+=horizSpace;
nav_post_final+=nav_list[deep-1]+"<br>";
} else {
nav_post_final+=nav_list[deep-1];
for (sp=0; sp<k; sp++) nav_post_final+=horizSpace;
nav_post_final+="<br>";
}
} else {
if (direction=='left') {
nav_post_final+="<br>";
nav_post_final+=nav_list[deep-1]+"<br>";
} else {
nav_post_final+="<br>";
nav_post_final+=nav_list[deep-1];
nav_post_final+="<br>";
}
}
and_finally=document.getElementById('nvtree');
and_finally.align=direction;
and_finally.vAlign="middle";
and_finally.innerHTML=(displayType==2 ? breakoff_b : nav_post_final);
break;
}
}
}
// -->
</script>
Preview: www.wormocodes.com