Help - Search - Members - Calendar
Full Version: Forum Member Legend
RuneCrypt Forum > General Board > Computing & Webdesign
Pure numse
Hey! im trying to make a simple Member Legend but i cant Add more than 1 Member why? it should look like this when its finish
IPB Image

This is the code im Using!

CODE
<script type='text/javascript'>
/*
Colors Key in Users Stats Box v1.2
Created by iFusion

*/

var irGroup = [1]
irGroup[0]=["<b>Leader</b>" , "#ffcc33" , "font-weight:bold" ]

var usersInput=""
for (i=0;i<irGroup.length;i++){
usersInput+="[<font style='" + irGroup[2] + "' color='" + irGroup[i][1] + "'>" + irGroup[i][0] + "</font>] "
}

var tCell = document.getElementsByTagName('TD')
for (i=0;i<tCell.length;i++){
if (tCell[i].width=="95%" && tCell[i].innerHTML.match(/anonymous members/i)){
tCell[i].getElementsByTagName('DIV')[0].innerHTML+="<br>Key: " + usersInput
}}
</script>

Cmafai
Hiya, I'm not really sure how that script is supposed to function, but give this a try:

CODE
<script type='text/javascript'>
/*
Colors Key in Users Stats Box v1.2
Created by iFusion

*/

var irGroup = new Array[];
irGroup[0]= new Array["<b>Leader</b>" , "#ffcc33" , "font-weight:bold" ];
irGroup[1]= new Array["<b>Whatever</b>" , "#ffcc33" , "font-weight:bold" ];
irGroup[2]= new Array["<b>Whatever</b>" , "#ffcc33" , "font-weight:bold" ];
irGroup[3]= new Array["<b>Whatever</b>" , "#ffcc33" , "font-weight:bold" ];
irGroup[4]= new Array["<b>Whatever</b>" , "#ffcc33" , "font-weight:bold" ];

var usersInput=""
for (i=0;i<irGroup.length;i++){
usersInput+="[<font style='" + irGroup[i][2] + "' color='" + irGroup[i][1] + "'>" + irGroup[i][0] + "</font>] "
}

var tCell = document.getElementsByTagName('TD')
for (i=0;i<tCell.length;i++){
if (tCell[i].width=="95%" && tCell[i].innerHTML.match(/anonymous members/i)){
tCell[i].getElementsByTagName('DIV')[0].innerHTML+="<br>Key: " + usersInput
}}
</script>


Just change the color (the hex code) and the group names to whatever you want for each entry in the array, and remember to keep increasing the key.

If that doesn't work, just wait a little bit and keep checking this thread... Falln, our Javascript wiz-kid, will come along soon enough, laugh at the way I did it, criticize my methods, then post a new fancy script for you that will somehow make use of closures and JSON notation.
Pure numse
Ow! Thank you very very Much...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.