I'm around and round we go
Moderator
May 8, 2013 19:35:22 GMT -5
Preview:
Same as the original for v4 (and honestly, that one works too). This one is just edited a little bit and easier to add into layout templates.
Add this part wherever you want the legend to show. This can be in your layout templates (like the Info Center) or in HTML for side tables, or in any headers/footers.
<div id="thenames"></div><div id="theboxes"></div>
And add this code to your
global footers, and edit the properties to however you want!
<script type="text/javascript">
/*
Smangii's "Roll-Me-Over" User Legend for v5
This legend will appear wherever this line of code is:
<div id="thenames"></div><div id="theboxes"></div>
*/
var legendname = "User Legend:"; // name of the legend
var boxwidth = "10px"; // width of the boxes
var boxheight = "20px"; // height of the boxes
var boxspace = "1px"; // space between the boxes
var namespace = "5px"; // space between the names and the boxes
// Edit each group as: ["Group title","Group color"]
var groups = [
["Owner","3366FF"],
["Administrator","CC33FF"],
["Global Moderator","FF3366"],
["Moderator","FF6633"],
["Premium Member","66CC99"],
["Registered Member","33CCFF"],
["Banned Member","ADAD00"] // No Comma on last line!
];
// below, you change "bold" to "normal" if you prefer
document.getElementById("thenames").style.fontWeight = "bold";
for(a=0;a<groups.length;a++){
document.getElementById("theboxes").innerHTML += '<div style="margin: '+namespace+' '+boxspace+' 0 0; width: '+boxwidth+'; height: '+boxheight+'; display: inline-block; background-color: #'+groups[a][1]+';" onmouseover="showL(\'<font color='+groups[a][1]+'>'+groups[a][0]+'</font>\');" onmouseout="hideL()"></div>';
}
document.getElementById("thenames").innerHTML = legendname;
function showL(name){document.getElementById("thenames").innerHTML = name;}
function hideL(){document.getElementById("thenames").innerHTML = legendname;}
//-->
</script>
If you need help editing anything let me know by replying.
May 16, 2013 10:51:34 GMT -5
Is there a way to get it to align with my user's online? Right now it's a little bit below all that information.
Ex.
finalsunrise.proboards.com/
Jul 24, 2013 5:00:40 GMT -5
This is what I was driving myself crazy trying to find when I first switched to v5! Awesome, thanks!
Aug 8, 2013 10:10:54 GMT -5
Is there a way to get it inside the info center, rather then above or below it?
Aug 8, 2013 11:37:01 GMT -5
Is there a way to get it inside the info center, rather then above or below it?
Where exactly in the info center would you like it displayed?
Then I can walk you through how to do it
Aug 8, 2013 12:11:42 GMT -5
Anywhere inside the info center, doesn't matter, as long as it's inside the info center then that's fine
Aug 11, 2013 15:10:36 GMT -5
any help would be great, still trying to figure it out
I'm around and round we go
OP
Moderator
Aug 11, 2013 15:24:48 GMT -5
You just have to place this part:
<div id="thenames"></div><div id="theboxes"></div>
In your info center ("Home" layout template).
Jan 2, 2015 11:55:10 GMT -5
I know this is old, but for some reason, the boxes is repeating for me, any idea why?
link to forum
Bite me, love me... it's all the same to me...
May 13, 2015 5:54:30 GMT -5
than you so much, i thoroughly enjoy it ❤
using here
Aug 25, 2017 1:13:29 GMT -5
It says there is a syntax error for me.
Dec 24, 2017 20:14:01 GMT -5
Sorry if this is a quick fix and I'm just totally missing it, but is there a way to move the boxes right beside the text User Legend?