Post by hpmad on Jan 1, 2007 22:31:23 GMT -5
Preview: clicky
The concept from IF Skins Zone, I just coded it for ProBoards. Called ProBattles because that was the forum I coded for.
Editing explained in the comments
<script type="text/javascript">
/* ProBattles User Legend by hpmad
Do not repost or claim without permission from creator.
This header must remain intact. */
var tehName = 'User Legend'; //text displayed under legend
var borderCol = '000000'; //button border color
var space = '1px'; //space between each button
var tehWidth = '10px'; //button width
var tehHeight = '10px'; //button height
var ulWidth = '20%'; //users legend area width
//['Rank Name','Rank Color'], omit comma on last line
var tehRanks = [
['Administrator','E3170D'],
['Global Moderator','993399'],
['Moderator','00AF33'],
['Member','003399']
];
//no need to edit anymore
function userLegend(rank){
document.getElementById('userL').innerHTML = '<b>'+rank+'</b>';
}
function removeLegend(){
document.getElementById('userL').innerHTML = '<br />';
}
var td = document.getElementsByTagName('td');
for(i=0;i<td.length;i++){
if(td.className=='catbg' && td.colSpan=='2' && td.innerHTML.match(/>Users Online</i)){
var tehStuff = '<table align="center" cellpadding="3" width="98%"><tr><td align="left" valign="top">'+td[i+2].firstChild.firstChild.firstChild.firstChild.innerHTML+'</td><td width="'+ulWidth+'"><div align="right" id="userL"><br /></div><table width="auto" cellspacing="0" cellpadding="'+space+'"><tr>';
for(t=0;t<tehRanks.length;t++){
tehStuff += '<td><div style="width: '+tehWidth+'; height: '+tehHeight+'; border: 1px solid #'+borderCol+'; float: left; background-color: #'+tehRanks[t][1]+';" onmouseover="userLegend(\''+tehRanks[t][0]+'\');" onmouseout="removeLegend()"></div></td>';
}
tehStuff += '</tr></table><b>'+tehName+'</b></td></tr></table>';
td[i+2].innerHTML = tehStuff;
}
}
</script>
The concept from IF Skins Zone, I just coded it for ProBoards. Called ProBattles because that was the forum I coded for.
Editing explained in the comments
<script type="text/javascript">
/* ProBattles User Legend by hpmad
Do not repost or claim without permission from creator.
This header must remain intact. */
var tehName = 'User Legend'; //text displayed under legend
var borderCol = '000000'; //button border color
var space = '1px'; //space between each button
var tehWidth = '10px'; //button width
var tehHeight = '10px'; //button height
var ulWidth = '20%'; //users legend area width
//['Rank Name','Rank Color'], omit comma on last line
var tehRanks = [
['Administrator','E3170D'],
['Global Moderator','993399'],
['Moderator','00AF33'],
['Member','003399']
];
//no need to edit anymore
function userLegend(rank){
document.getElementById('userL').innerHTML = '<b>'+rank+'</b>';
}
function removeLegend(){
document.getElementById('userL').innerHTML = '<br />';
}
var td = document.getElementsByTagName('td');
for(i=0;i<td.length;i++){
if(td.className=='catbg' && td.colSpan=='2' && td.innerHTML.match(/>Users Online</i)){
var tehStuff = '<table align="center" cellpadding="3" width="98%"><tr><td align="left" valign="top">'+td[i+2].firstChild.firstChild.firstChild.firstChild.innerHTML+'</td><td width="'+ulWidth+'"><div align="right" id="userL"><br /></div><table width="auto" cellspacing="0" cellpadding="'+space+'"><tr>';
for(t=0;t<tehRanks.length;t++){
tehStuff += '<td><div style="width: '+tehWidth+'; height: '+tehHeight+'; border: 1px solid #'+borderCol+'; float: left; background-color: #'+tehRanks[t][1]+';" onmouseover="userLegend(\''+tehRanks[t][0]+'\');" onmouseout="removeLegend()"></div></td>';
}
tehStuff += '</tr></table><b>'+tehName+'</b></td></tr></table>';
td[i+2].innerHTML = tehStuff;
}
}
</script>