Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Add Reply
Hover Member Legend; with automatic pips!
Topic Started: Nov 26 2007, 07:17 PM (12,491 Views)
Mike
Member Avatar
Coda
[ *  *  * ]
Name:
Hover Member Legend (By Mwr247)

Description:
A member legend unlike the rest. Simply add in the name of the group, the color, and the group number, along with the base url of your board and it's set up! You can add more groups if you like as well.

Once added, the user legend will display colored pips for each of your groups in your user legend. Hovering over each one will cause the "Member Legend" text to change into the name of the group. Clicking a box will search for everyone in that group in the member list.

Now, for my favorite part. Unlike most user legends that require you to make, upload, and load image boxes for every color, this actually uses does it for you using blocks of text, allowing for simple use and easy installation. Basically automatic pips of any color you can imagine!

Browser compatibility:
Tested to work in IE, FireFox, Mozilla, and Opera.

Preview:
RandomScriptPreviews
Check the Board Statistics.

Installation:
Goes in your board wrapper footers:
Quote:
 
<script>
// Hover Member Legend (By Mwr247)

// Add Groups (Title, Color, Group_Number)
var n=0;
var addgroup=[];
addgroup[n++]=['Administrator','red','4'];
addgroup[n++]=['Moderator','blue','6'];
addgroup[n++]=['Member','green','3'];
addgroup[n++]=['Validating','black','1'];
addgroup[n++]=['<s>Banned</s>','purple','5'];
</script>
<script name="H.M.L." src="http://i4.ifrm.com/12221/196/upload/p349942.ibf"></script>

The text in red is the title of the group that appears when you hover over the block. To add effects such as a strikethrough or bold or underline, just put the tags around it, like in the banned example.

The text in blue the color of the group. This color will effect the block and the title text.

The text in green is the group number. To find that, go to "Manage User Groups", hover your mouse over the "Edit Group" link for the group you want, and look at the number at the end of the link. That is the group number.

And that's it! Your super amazing hover user legend is installed! Enjoy :D

P.S
An optional addition to the code I just realized. If you want, you can also make it so that instead of just hovering over the auto-pips to make the user group show up, you can hover on member names and make it change as well! To do this, go to "manage user groups" in the acp and pick a group to start with. Lets assume you're choosing "Administrator" and the color is "red". Now, simply edit the group prefix and add the following attributes to the span or font class:
Quote:
 
onmouseover="mlo('Administrator','red');" onmouseout="mlc();"
So in the end, it should look like this:
Quote:
 
<span style="color:red" onmouseover="mlo('Administrator','red');" onmouseout="mlc();">
Now, just do the same for all the other groups and your done! A demo is available on the test board, but only works when someone from one of the groups is online.

Notes:
Thanks to Big Boards for the inspiration to make this code (made for a coding contest there). Wouldn't have thought of it without them :)
Offline Profile Quote Post Goto Top
 
Lothar99
Member
[ *  * ]
Cool script, thanks for the share.

~I cant get it work :S.
Offline Profile Quote Post Goto Top
 
Mike
Member Avatar
Coda
[ *  *  * ]
That's interesting, PM me a link to your board.

Actually, lemme test something first.

EDIT:
Ok, I think I know the problem, and I fixed it. Just me being stupid with my coding lol...
Offline Profile Quote Post Goto Top
 
Lothar99
Member
[ *  * ]
Still not working, :S... okay well I got to go right now, I hope the problem gets fixed, good luck.
Offline Profile Quote Post Goto Top
 
Mike
Member Avatar
Coda
[ *  *  * ]
Really? Well PM me a link when you can, cause I want to figure out what it possibly is.

P.S.
Are you sure? Try refreshing a few times, cause I updated the code. May just be cached with the bad one.
Offline Profile Quote Post Goto Top
 
Lothar99
Member
[ *  * ]
My link is in the code, heres the code -

Code:
 
<script>
// Hover Member Legend (By Mwr247)

// Base Url
var mlu='http://z15.invisionfree.com/EliteGfX/';

// Add Groups (Title, Color, Group_Number)
var addgroup=[];
addgroup[0]=['Admin','red','4'];
addgroup[1]=['Moderator','blue','6'];
addgroup[2]=['Member','green','3'];
addgroup[3]=['Validating','black','1'];
addgroup[4]=['<s>Banned</s>','purple','5'];
</script>
<script name="H.M.L." src="http://i4.ifrm.com/12221/196/upload/p349942.ibf"></script>
Offline Profile Quote Post Goto Top
 
Valdez
Member Avatar
►:▓░▬┴♣ ╝♀╞
[ *  *  *  * ]
Wow, that's an excellent code! I've been looking for something like this! 10/10. Keep up the great work, mwr247!
Offline Profile Quote Post Goto Top
 
Mike
Member Avatar
Coda
[ *  *  * ]
Lothar99:
I checked out your board, and it's working properly: Posted Image
Quite odd that you can see in on my test board, but not your own forum. All I can tell you is that this must be a problem on your end, not the code. Sorry :(

Ermacrules29:
Thanks :D
Offline Profile Quote Post Goto Top
 
Lothar99
Member
[ *  * ]
Okay when I get back from school Ill try and fix the code up.
Offline Profile Quote Post Goto Top
 
Mike
Member Avatar
Coda
[ *  *  * ]
And when I get back from school I'll see what I can do to help you all I can. Hopefully we can solve this anomaly!
Offline Profile Quote Post Goto Top
 
Lothar99
Member
[ *  * ]
Hmmm, still not working.... I tried editing pretty much all of the code, and its still not working, I dont really know what to do at this point, Ill try replacing the code in different parts of the board wrappers.

Edit - Still not working :/
Offline Profile Quote Post Goto Top
 
Mike
Member Avatar
Coda
[ *  *  * ]
Again, the code isn't the problem. If you saw above, I was able to see it on your board. The problem must be either your computer or your browser relating to your board.
Offline Profile Quote Post Goto Top
 
Lothar99
Member
[ *  * ]
I can also see the member legend, but I cannot see the color of my name changing, and I am using Firefox.
Offline Profile Quote Post Goto Top
 
boy82
Member
[ * ]
Great code man, And this doesnt take much space at all :P
Offline Profile Quote Post Goto Top
 
Skyvale
Member Avatar
Thanks for the avatar, TTO!
[ *  *  *  *  *  *  *  * ]
Very nice member legend. :)
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Free Forums. Reliable service with over 8 years of experience.
Go to Next Page
« Previous Topic · Codes & Modifications · Next Topic »
Add Reply