Post by hpmad on May 9, 2006 16:13:37 GMT -8
Description:
Pretty simple, but cool-looking user legend in the info center. The concept from IF Skins Zone, I just coded it for ProBoards. It's called "ProBattles" because that was the forum I coded for. Editing is explained in the comments.
Preview:
img222.imageshack.us/img222/3384/pblegend0of.gif
Main Footer:
<script type="text/javascript">
<!--
/* ProBattles User Legend by hpmad
Do not repost or claim without permission from creator
For more codes like this one go to: talkpark.net */
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 x = '<table align="center" cellpadding="3" width="98%"><tr><td align="left" valign="top">'+td[i+4].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++) x += '<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>';
x += '</tr></table><b>'+tehName+'</b></td></tr></table>';
td[i+4].innerHTML = x;
}
}
//-->
</script>
Pretty simple, but cool-looking user legend in the info center. The concept from IF Skins Zone, I just coded it for ProBoards. It's called "ProBattles" because that was the forum I coded for. Editing is explained in the comments.
Preview:
img222.imageshack.us/img222/3384/pblegend0of.gif
Main Footer:
<script type="text/javascript">
<!--
/* ProBattles User Legend by hpmad
Do not repost or claim without permission from creator
For more codes like this one go to: talkpark.net */
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 x = '<table align="center" cellpadding="3" width="98%"><tr><td align="left" valign="top">'+td[i+4].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++) x += '<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>';
x += '</tr></table><b>'+tehName+'</b></td></tr></table>';
td[i+4].innerHTML = x;
}
}
//-->
</script>