Matt
Graphics Admin
Great admin or greatest admin?
Posts: 4,891
|
Post by Matt on Jun 5, 2006 20:40:14 GMT -5
Created By: Todge Creator's Comments: This will chane the title color of each board depending on the amount of posts each has...
Put it in your Main Footer...
<script language=JavaScript> <!--
// Board Title color depending on amount of posts // By Todge
var level = new Array(0); var levelColor = new Array('');
// Edit below here...
level[1] = 100; levelColor[1] = 'red'; level[2] = 500; levelColor[2] = 'blue'; level[3] = 1000; levelColor[3] = 'gold';
// Edit above here...
document.write('<style>'); for(l=0; l<level.length-1; l++) { document.write('.level'+(l+1)+':link { color: '+levelColor[l+1]+'; }'); } document.write('</style>');
var p; var BCell = document.getElementsByTagName('TD'); for(t=0; t<BCell.length; t++) { if(BCell[t].width == '66%' && BCell[t].className == 'windowbg2') { p = parseInt(BCell[t+2].getElementsByTagName('font')[0].innerHTML.split(',').join('')); for(c=1; c<level.length; c++) { if(p >= level[c]) { BCell[t].getElementsByTagName('A')[0].className = 'level'+c; } } } }
// --> </script>
Edit it as follows....
level[1] = 100; levelColor[1] = 'red'; level[2] = 500; levelColor[2] = 'blue'; level[3] = 1000; levelColor[3] = 'gold';
You can use hex colors instead of named colors...
As it stands, boards with more than 100 posts will be red, boards with more than 500 will be blue etc.
Keep adding...
level[4] = AMOUNT OF POSTS; levelColor[4] = 'COLOR OF TITLE';
for all your levels...
|
|
|
Post by Parker on Nov 10, 2007 12:01:34 GMT -5
Hmmm I like this...thanks a lot!
|
|