Title: [S] [S] I've bee
Description: Member group-colour-writing-thingie...
Mad_madeye - April 6, 2006 05:02 PM (GMT)
My RPG site's an Invisionfree-site and I've been wondering about something... You know the names of all the members online that show up at the bottom of the page? How can I give those names specific colours/fonts differing per member group? I know it probably has something to do with the member groups, but I can't really find it, so, does anyone care to help?
I hope it makes sense... :unsure:
Andy - April 7, 2006 06:09 PM (GMT)
If you go into the admin cp, then go to 'manage user groups'.
This should give you your list of member groups. Next, click on 'edit group'.
Now on this screen, scroll until you see a field with the label 'Online List Format [Prefix]'
In this box you must put the colour, best of using the hex code, for the colour you want.
Example, my group 'admin' is B22222 for colour. You must put is in the little template it suggests:
(Example:<span style='color:red'>)
So for my group it is:
<span style='color:B22222'>
Hope that helps!
Mad_madeye - April 8, 2006 06:35 AM (GMT)
Ah, I see! Thanks a bunch, dude! :D
You wouldn't happen to know how to add the little key thing too, do you? Y'know, to show what all the colours signify?
Andy - April 8, 2006 09:25 AM (GMT)
That would be a code, you'd have to find a code you like, and then within that code, place the names of positions on the boards and colours you wish them to be.
Might find what you want at
Invisionfree, just have a look in the code index or something. It will probably be listed under 'legend'. Not sure though. :D
Leo - April 8, 2006 10:55 AM (GMT)
<div align="center">
<table width="95%" id="userlinks" cellspacing="6" border="1" bordercolor="black">
<tr>
<td align="center">
<font color="colour of '['">[ <b><a href="link to member group"><font color="color of name">Name of Group</font></a></b> ] </font>
</td>
</tr>
</table>
</div>
That would be the code you are looking for, just change the stuff in red and you'd be sorted
this code goes in header and body and normally under the <% BOARD %> thingy
ShinLi - April 8, 2006 11:14 AM (GMT)
At
http://forums.ifskinzone.net you can find some other awesome codes as well. There are zillion codes for those online member colour thingies.
I think Andy didn't say, but after you put the little code in the 'Online List Format [Prefix]' you have to do put this '</span>' in the 'Online List Format [Suffix]'
For bold or italics or other thingies, just put it like this
| QUOTE |
| <b><span style='color:red'> |
and....
Change the <b></b> with other like <i> to make the names italics, underlined etc.
Mad_madeye - April 9, 2006 10:27 AM (GMT)
Thanks for all the help, you guys. ^_^
| QUOTE |
<div align="center"> <table width="95%" id="userlinks" cellspacing="6" border="1" bordercolor="black"> <tr> <td align="center"> <font color="colour of '['">[ <b><a href="link to member group"><font color="color of name">Name of Group</font></a></b> ] </font> </td> </tr> </table> </div>
That would be the code you are looking for, just change the stuff in red and you'd be sorted
this code goes in header and body and normally under the <% BOARD %> thingy |
Uhm, kinda confused, but then again, I'm not exactly an expert with code to say the least... :ph43r: Could anyone give me an example?
@Shinli: That's weird, I didn't put anything in the suffix-thing but it turned out alright... :blink:
Andy - April 10, 2006 11:16 AM (GMT)
Yah, if you have a look in the label next to the suffix field, it looks like you can leave it blank and it will assume </span> at the end. So you only really need to use the suffix is you are adding something as ShinLi said, like making the names bold. :D
Mad_madeye - April 10, 2006 06:17 PM (GMT)
| QUOTE (Andy @ Apr 10 2006, 11:16 AM) |
| Yah, if you have a look in the label next to the suffix field, it looks like you can leave it blank and it will assume </span> at the end. So you only really need to use the suffix is you are adding something as ShinLi said, like making the names bold. :D |
Oh, that makes sense. :D
Jess - April 16, 2006 02:27 AM (GMT)
If you’re still looking for an example for the key, here’s one... This also renames your 'Guests' to 'Visitors', 'Members' to 'Students and Staff' and 'Anonymous' to 'Ghosts' on the stats. ;) (And the coding wasn't done by me but by Webworldx, from the IF forums I think...)
| CODE |
<script> /*Colors Key and Users Online Modification By Webworldx
Code created for iF. Do not redistribute */
var Users =["Unsorted Students", "Staff Member", "Gryffindor", "Hufflepuff", "Slytherin", "Ravenclaw", "Global Moderator", "Administrator"] var Colors =["000000", "672B03", "b40c04", "d1b223", "31702c", "0f0f87", "0382AC", "008080"]
var inputUsers="" for (a=0;a<Users.length;a++){ inputUsers+="[<font color=#" + Colors[a] + ">" + Users[a] + "</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].innerHTML= tCell[i].innerHTML.replace(/<\/div>/i,"<br/><b>Key: </b>" + inputUsers + "</div>")
var eSplit = tCell[i].innerHTML.split(/<DIV/i)[0].split(' guests,') var memArray=new Array(); memArray[0]=eSplit[0] eSplit=eSplit[1].split(' members,') memArray[1]=eSplit[0] eSplit=eSplit[1].split(' anonymous') memArray[2]=eSplit[0]
eSplit = tCell[i].innerHTML.split(/<DIV/i)[0] tCell[i].innerHTML = tCell[i].innerHTML.replace(eSplit,"{ <a href='/index.php?act=Online&CODE=listall&sort_key=name&show_mem=guest&sort_order=desc'><font color=#00484C>Visitors</font></a> - " + memArray[0] + "} + { <a href='/index.php?act=Online&CODE=listall&sort_key=name&show_mem=reg&sort_order=desc'><font color=#00484C>Students & Staff</font></a> - " + memArray[1] + "} + { <a href='/index.php?act=Online&CODE=listall&sort_key=name&show_mem=all&sort_order=desc'><font color=#00484C>Ghosts</font></a> - " + memArray[2] + "} ") tCell[i].align="center" var xFind = tCell[i].getElementsByTagName('DIV') for (x=0;x<xFind.length;x++){ if (xFind[x].className=="thin"){ xFind[x].innerHTML="<b>Online User List: </b>" + xFind[x].innerHTML }}}} </script> |
If you need help editing that to fit the colours and member groups you have, PM me a link to your forum just asking me to look over the code and I'd be happy to edit it for you, and then I'd PM you the code. (The only reason I'd need a link is so I could see what colours you wanted.)
Walker - April 22, 2006 07:05 PM (GMT)
Aha!
| QUOTE |
| <b><span style='color:red'> |
I always thought it was:
| QUOTE |
| <b><span style='color:red'></b> |
Makes me fell a little dumb! ^_^
ShinLi - June 15, 2006 01:44 PM (GMT)
Your topic has been solved and moved to the 'Solved Support Topics' forum! Still have a question, or something isn't clear yet? PM an admin, gmod or cmod, and it will be moved back to the Support Center.