Post by CrAzY_J on Jan 4, 2006 19:34:54 GMT -8
Code description: This code replaces the board name (text) with a image, you can manually choose which board names to replace with a image. All boards can have different images.
Code creator: CrAzY_J
Code placement: Main Footers
<script type='text/javascript'>
/* Replace Board name with image
created by CrAzY_J
Do not redistribute this code without the creator's permission*/
var Replace = [
['boardid','imageurl'],
['boardid','imageurl'],
['boardid','imageurl'],
['boardid','imageurl']
];
var Cells = document.body.getElementsByTagName('td');
if( this.location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/) )
{
for( var c = 0 ; c < Cells.length ; c ++ )
{
for( var a = 0 ; a < Replace.length ; a ++ )
{
if( Cells[c].width == '66%' && Cells[c].className == 'windowbg2' && Cells[c].getElementsByTagName('a')[0].href )
{
if( Cells[c].getElementsByTagName('a')[0].href.match( new RegExp('board='+Replace[0],'i') ))
{
Cells[c].firstChild.firstChild.removeChild( Cells[c].firstChild.firstChild.firstChild );
var Image = document.createElement('img');
Image.border = 0;
Image.src = Replace[1];
Cells[c].firstChild.appendChild( Image );
}
}
}
}
}
</script>
Code instructions:
All you need to do is edit the red part and the orange part, the red part is the id of the board you want to change. The orange part is the url of the image you want to replace the text with.
If you want to replace the text of more boards, you can just add this line where the other lines are:
['boardid','imageurl']
Watch out with the commas, see that currently there is a comma after each of the lines you have to edit except the last one. Keep it that way, so if you add more lines, make sure each has a comma except the last one.
For any other support, go to the code support board.
Enjoy
Code creator: CrAzY_J
Code placement: Main Footers
<script type='text/javascript'>
/* Replace Board name with image
created by CrAzY_J
Do not redistribute this code without the creator's permission*/
var Replace = [
['boardid','imageurl'],
['boardid','imageurl'],
['boardid','imageurl'],
['boardid','imageurl']
];
var Cells = document.body.getElementsByTagName('td');
if( this.location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/) )
{
for( var c = 0 ; c < Cells.length ; c ++ )
{
for( var a = 0 ; a < Replace.length ; a ++ )
{
if( Cells[c].width == '66%' && Cells[c].className == 'windowbg2' && Cells[c].getElementsByTagName('a')[0].href )
{
if( Cells[c].getElementsByTagName('a')[0].href.match( new RegExp('board='+Replace[0],'i') ))
{
Cells[c].firstChild.firstChild.removeChild( Cells[c].firstChild.firstChild.firstChild );
var Image = document.createElement('img');
Image.border = 0;
Image.src = Replace[1];
Cells[c].firstChild.appendChild( Image );
}
}
}
}
}
</script>
Code instructions:
All you need to do is edit the red part and the orange part, the red part is the id of the board you want to change. The orange part is the url of the image you want to replace the text with.
If you want to replace the text of more boards, you can just add this line where the other lines are:
['boardid','imageurl']
Watch out with the commas, see that currently there is a comma after each of the lines you have to edit except the last one. Keep it that way, so if you add more lines, make sure each has a comma except the last one.
For any other support, go to the code support board.
Enjoy