Post by CrAzY_J on Nov 1, 2005 19:26:35 GMT
Code description: This code lets you reorder the board cells on the main page ( forum name, on/off icons, last post etc )
Code Creator: CrAzY_J
Code placement: Main Footers
Special Thanks: All PB coders
<script type="text/javascript">
/* Reorder Main Page cells V1.0
Created by CrAzY_J
Do not redistribute this code without the creator's permission
Main Footers*/
var WWX = [1,2,3,4,5];
var Forte = [];
var Uchiha_Sasuke = [];
var Ross = 0;
var Jello = document.body.getElementsByTagName("tr");
var a_leon = [[1,2,3,4,5,6,7,8,9],['one','two','three','four','five','six','seven','eight','nine']];
function Peter()
{
for( cd = 0 ; cd < Jello.length ; cd ++ )
{
if( Jello[cd].cells[0].className == "titlebg" && Jello[cd].cells[0].innerHTML.match(/Forum\sName/) )
{
Jello[cd].setAttribute('id','hechizero');
Jello[cd].cells[0].colSpan = 1;
var hpmad = Jello[cd].insertCell(0); hpmad.className = "titlebg";
for( jay = 0 ; jay < Jello[cd].cells.length ; jay ++ )
{
Forte.push( Jello[cd].cells[jay] );
Jello[cd].removeChild( Jello[cd].cells[jay] );
jay --;
}
}
if( Jello[cd].cells[0])
{
if( Jello[cd].cells[0].className == "windowbg" && Jello[cd].cells[0].width == "8%" )
{
Uchiha_Sasuke.push( [cd] );
for( zt = 0 ; zt < Jello[cd].cells.length ; zt ++ )
{
Uchiha_Sasuke[Uchiha_Sasuke.length-1].push( Jello[cd].cells[zt] );
Jello[cd].removeChild( Jello[cd].cells[zt] );
zt --;
}
Ross++;
var Naruto = Ross.toString();
for( shin = 0 ; shin < a_leon[1].length ; shin ++ )
Naruto = Naruto.replace(new RegExp(a_leon[0][shin],"gi"),a_leon[1][shin]);
Jello[cd].id = 'Joe'+Naruto;
}
}
}
for( cali = 0 ; cali < WWX.length ; cali ++ )
{
var Hechi = document.getElementById('hechizero');
if( Forte[WWX[cali]-1] )
Hechi.appendChild( Forte[WWX[cali]-1] );
}
}
function acoolie()
{
for( cali = 0 ; cali < WWX.length ; cali ++ )
{
for( greg = 1 ; greg < Uchiha_Sasuke.length+1 ; greg ++ )
{
var Moose = greg.toString();
for( shin = 0 ; shin < a_leon[1].length ; shin ++ )
Moose = Moose.replace(new RegExp(a_leon[0][shin],"gi"),a_leon[1][shin]);
var Mousy = document.getElementById('Joe'+Moose);
Mousy.appendChild( Uchiha_Sasuke[greg-1][WWX[cali]] );
}
}
}
if( this.location.href.match(/\.com(\/(index\.cgi(\?|#\w+)?)?)?$/))
{
Peter();
acoolie();
}
</script>
Code Instructions
Edit the red part of the code, the numbers are the cells of the boards:
1 = on/off icons
2 = Forum Name
3 = Topics
4 = Posts
5 = Last post
So the board cells on the main page will show depending on how you order the numbers in the red part ( Don't forget the commas)
So say we want the on/off icons all the way to the back, then we would use this order:
Because 1 is the on/off icons cell and we put it all the way to the back.
If you leave out a number, that cell will not show.
Play around with it and you'll get the hang of it. If you still need help, ask in code support. Please do not PM me.
Code Creator: CrAzY_J
Code placement: Main Footers
Special Thanks: All PB coders
<script type="text/javascript">
/* Reorder Main Page cells V1.0
Created by CrAzY_J
Do not redistribute this code without the creator's permission
Main Footers*/
var WWX = [1,2,3,4,5];
var Forte = [];
var Uchiha_Sasuke = [];
var Ross = 0;
var Jello = document.body.getElementsByTagName("tr");
var a_leon = [[1,2,3,4,5,6,7,8,9],['one','two','three','four','five','six','seven','eight','nine']];
function Peter()
{
for( cd = 0 ; cd < Jello.length ; cd ++ )
{
if( Jello[cd].cells[0].className == "titlebg" && Jello[cd].cells[0].innerHTML.match(/Forum\sName/) )
{
Jello[cd].setAttribute('id','hechizero');
Jello[cd].cells[0].colSpan = 1;
var hpmad = Jello[cd].insertCell(0); hpmad.className = "titlebg";
for( jay = 0 ; jay < Jello[cd].cells.length ; jay ++ )
{
Forte.push( Jello[cd].cells[jay] );
Jello[cd].removeChild( Jello[cd].cells[jay] );
jay --;
}
}
if( Jello[cd].cells[0])
{
if( Jello[cd].cells[0].className == "windowbg" && Jello[cd].cells[0].width == "8%" )
{
Uchiha_Sasuke.push( [cd] );
for( zt = 0 ; zt < Jello[cd].cells.length ; zt ++ )
{
Uchiha_Sasuke[Uchiha_Sasuke.length-1].push( Jello[cd].cells[zt] );
Jello[cd].removeChild( Jello[cd].cells[zt] );
zt --;
}
Ross++;
var Naruto = Ross.toString();
for( shin = 0 ; shin < a_leon[1].length ; shin ++ )
Naruto = Naruto.replace(new RegExp(a_leon[0][shin],"gi"),a_leon[1][shin]);
Jello[cd].id = 'Joe'+Naruto;
}
}
}
for( cali = 0 ; cali < WWX.length ; cali ++ )
{
var Hechi = document.getElementById('hechizero');
if( Forte[WWX[cali]-1] )
Hechi.appendChild( Forte[WWX[cali]-1] );
}
}
function acoolie()
{
for( cali = 0 ; cali < WWX.length ; cali ++ )
{
for( greg = 1 ; greg < Uchiha_Sasuke.length+1 ; greg ++ )
{
var Moose = greg.toString();
for( shin = 0 ; shin < a_leon[1].length ; shin ++ )
Moose = Moose.replace(new RegExp(a_leon[0][shin],"gi"),a_leon[1][shin]);
var Mousy = document.getElementById('Joe'+Moose);
Mousy.appendChild( Uchiha_Sasuke[greg-1][WWX[cali]] );
}
}
}
if( this.location.href.match(/\.com(\/(index\.cgi(\?|#\w+)?)?)?$/))
{
Peter();
acoolie();
}
</script>
Code Instructions
Edit the red part of the code, the numbers are the cells of the boards:
1 = on/off icons
2 = Forum Name
3 = Topics
4 = Posts
5 = Last post
So the board cells on the main page will show depending on how you order the numbers in the red part ( Don't forget the commas)
So say we want the on/off icons all the way to the back, then we would use this order:
[2,3,4,5,1]
Because 1 is the on/off icons cell and we put it all the way to the back.
If you leave out a number, that cell will not show.
Play around with it and you'll get the hang of it. If you still need help, ask in code support. Please do not PM me.