Post by CrAzY_J on Oct 31, 2005 14:43:49 GMT -8
Code description: This code gives you the ability to reorder the cells in each board.
Code creator: CrAzY_J
Code placement: Global Footers
<script type="text/javascript">
/* Reorder Board cells V1.0
Created by CrAzY_J
Do not redistribute this code without the creator's permission*/
var Nidaime = [1,2,3,4,5,6,7];
var Tsunade = [1,2,3,4,5,6,7,8];
var Shodaime = [];
var Sandaime = [];
/* DO not edit beyond this point */
var Naruto = document.body.getElementsByTagName("tr");
var Sasuke = 0;
var Shino = false;
var Orochimaru = [
[0,1,2,3,4,5,6,7,8,9],
['zero','one','two','three','four','five','six','seven','eight','nine']
];
function Itachi()
{
for( fox = 0 ; fox < Naruto.length ; fox ++ )
{
if( Naruto[fox].cells[0].className == "catbg" && Naruto[fox].cells[0].width == "5%")
{
Naruto[fox].parentNode.setAttribute('id','ero_sennin');
Shino = (Naruto[fox-1].getElementsByTagName("a")[1].href.match(/moderationmode=1/) )? false:true;
Naruto[fox].setAttribute('id','konoha');
for( chakra = 0 ; chakra < Naruto[fox].cells.length ; chakra ++ )
{
Shodaime.push( Naruto[fox].cells[chakra] );
Naruto[fox].removeChild( Naruto[fox].cells[chakra] );
chakra --;
}
}
if( Naruto[fox].cells[0] )
{
if( Naruto[fox].cells[0].width == "5%" && Naruto[fox].cells[0].className == "windowbg2" )
{
Sandaime.push( [fox] );
for( sakura = 0 ; sakura < Naruto[fox].cells.length ; sakura ++ )
{
Sandaime[Sandaime.length-1].push( Naruto[fox].cells[sakura] );
Naruto[fox].removeChild( Naruto[fox].cells[sakura] );
sakura --;
}
Sasuke++;
var Kimimaru = Sasuke.toString()
for( kabuto = 0 ; kabuto < Orochimaru[0].length ; kabuto ++ )
Kimimaru = Kimimaru.replace(new RegExp(Orochimaru[0][kabuto],"gi"),Orochimaru[1][kabuto]);
Naruto[fox].setAttribute('id','jiraya'+Kimimaru);
}
}
}
var Kakashi = ( Shino == true )? Tsunade:Nidaime;
var Konoha = document.getElementById('konoha');
for( hokage = 0 ; hokage < Kakashi.length ; hokage ++ )
{
if( Shodaime[Kakashi[hokage]-1] )
Konoha.appendChild( Shodaime[Kakashi[hokage]-1] );
for( yondaime = 1 ; yondaime < Sandaime.length+1 ; yondaime ++ )
{
var Obito = yondaime.toString();
for( kabuto = 0 ; kabuto < Orochimaru[0].length ; kabuto ++ )
Obito = Obito.replace(new RegExp(Orochimaru[0][kabuto],"gi"),Orochimaru[1][kabuto]);
var ero_sennin = document.getElementById('jiraya'+Obito);
ero_sennin.appendChild(Sandaime[yondaime-1][Kakashi[hokage]] );
}
}
}
if( this.location.href.match(/\?board=\w+/i) )
Itachi();
</script>
COde instructions
Edit the colored parts to reorder the cells, each number contains the information of a cell. So if you reorder those number the cells will also reorder.
Here are some information about each number.
1 = Folder icons | checkbox (advanced moderation mode)
2 = Message icons | folder icons (advanced moderation mode)
3 = Subject | Message icons (advanced moderation mode)
4 = Started by | Subject (advanced moderation mode)
5 = Replies | Started by (advanced moderation mode)
6 = Views | Replies (advanced moderation mode)
7 = Last Post | Views (advanced moderation mode)
8 = --------- | Last post (advanced moderation mode)
red is for the cells normally viewing in the board, and the green is for viewing in advanced moderation mode.
So just change the numbers to whatever you like:
If you leave out a number, the cell will just not show up ( no errors )
Play around with those number and you'll get the hang of it. Don't forget to add those commas.
If you need any help, ask in code support. Don't PM me for support related questions.
Code creator: CrAzY_J
Code placement: Global Footers
<script type="text/javascript">
/* Reorder Board cells V1.0
Created by CrAzY_J
Do not redistribute this code without the creator's permission*/
var Nidaime = [1,2,3,4,5,6,7];
var Tsunade = [1,2,3,4,5,6,7,8];
var Shodaime = [];
var Sandaime = [];
/* DO not edit beyond this point */
var Naruto = document.body.getElementsByTagName("tr");
var Sasuke = 0;
var Shino = false;
var Orochimaru = [
[0,1,2,3,4,5,6,7,8,9],
['zero','one','two','three','four','five','six','seven','eight','nine']
];
function Itachi()
{
for( fox = 0 ; fox < Naruto.length ; fox ++ )
{
if( Naruto[fox].cells[0].className == "catbg" && Naruto[fox].cells[0].width == "5%")
{
Naruto[fox].parentNode.setAttribute('id','ero_sennin');
Shino = (Naruto[fox-1].getElementsByTagName("a")[1].href.match(/moderationmode=1/) )? false:true;
Naruto[fox].setAttribute('id','konoha');
for( chakra = 0 ; chakra < Naruto[fox].cells.length ; chakra ++ )
{
Shodaime.push( Naruto[fox].cells[chakra] );
Naruto[fox].removeChild( Naruto[fox].cells[chakra] );
chakra --;
}
}
if( Naruto[fox].cells[0] )
{
if( Naruto[fox].cells[0].width == "5%" && Naruto[fox].cells[0].className == "windowbg2" )
{
Sandaime.push( [fox] );
for( sakura = 0 ; sakura < Naruto[fox].cells.length ; sakura ++ )
{
Sandaime[Sandaime.length-1].push( Naruto[fox].cells[sakura] );
Naruto[fox].removeChild( Naruto[fox].cells[sakura] );
sakura --;
}
Sasuke++;
var Kimimaru = Sasuke.toString()
for( kabuto = 0 ; kabuto < Orochimaru[0].length ; kabuto ++ )
Kimimaru = Kimimaru.replace(new RegExp(Orochimaru[0][kabuto],"gi"),Orochimaru[1][kabuto]);
Naruto[fox].setAttribute('id','jiraya'+Kimimaru);
}
}
}
var Kakashi = ( Shino == true )? Tsunade:Nidaime;
var Konoha = document.getElementById('konoha');
for( hokage = 0 ; hokage < Kakashi.length ; hokage ++ )
{
if( Shodaime[Kakashi[hokage]-1] )
Konoha.appendChild( Shodaime[Kakashi[hokage]-1] );
for( yondaime = 1 ; yondaime < Sandaime.length+1 ; yondaime ++ )
{
var Obito = yondaime.toString();
for( kabuto = 0 ; kabuto < Orochimaru[0].length ; kabuto ++ )
Obito = Obito.replace(new RegExp(Orochimaru[0][kabuto],"gi"),Orochimaru[1][kabuto]);
var ero_sennin = document.getElementById('jiraya'+Obito);
ero_sennin.appendChild(Sandaime[yondaime-1][Kakashi[hokage]] );
}
}
}
if( this.location.href.match(/\?board=\w+/i) )
Itachi();
</script>
COde instructions
Edit the colored parts to reorder the cells, each number contains the information of a cell. So if you reorder those number the cells will also reorder.
Here are some information about each number.
1 = Folder icons | checkbox (advanced moderation mode)
2 = Message icons | folder icons (advanced moderation mode)
3 = Subject | Message icons (advanced moderation mode)
4 = Started by | Subject (advanced moderation mode)
5 = Replies | Started by (advanced moderation mode)
6 = Views | Replies (advanced moderation mode)
7 = Last Post | Views (advanced moderation mode)
8 = --------- | Last post (advanced moderation mode)
red is for the cells normally viewing in the board, and the green is for viewing in advanced moderation mode.
So just change the numbers to whatever you like:
[2,3,4,1,7,6,5]
for example, untill you get something you like.If you leave out a number, the cell will just not show up ( no errors )
Play around with those number and you'll get the hang of it. Don't forget to add those commas.
If you need any help, ask in code support. Don't PM me for support related questions.