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
Group color changes on boards
Topic Started: Dec 12 2011, 05:26 PM (775 Views)
Brez
Member
[ * ]
Hey guys. I'd like to change the colors of my groups where they appear on boards. This is the code I'm using:

Code:
 
<script type="text/javascript">
//C.U.A.B
//By Choco
function colorUser(uN,u,uNa) {
$("a[@href*=/profile/"+uN+"/]").not("[img]").each(function() {
a=this;a.className=(u.match(/\./))?u.split(".")[1]:a.className;
a.style.color=(!(u.match(/\./)))?u:a.style.color;
a.innerHTML=(uNa)?uNa:a.innerHTML;
});
}
colorUser("user #","new color","newname");
</script>



I'd like to change the color of the names that appear on the right side of this picture: http://puu.sh/avuA
Do you see how they all appear red? That is defaulted by the board. That group color is actually purple. How would this be changed?

I've managed to be able to change just ONE or MULTIPLE users by copying the code over and over again and entering the members number and color, but that will get extremely hectic once my forums gain more and more members to change each one specifically.

Is there a way that this code can be used to change an ENTIRE group to do this rather than specify just one user? How would this be done?

Thanks in advance!!
Edited by Brez, Dec 12 2011, 05:28 PM.
Offline Profile Quote Post Goto Top
 
Reid-ZNS
Member Avatar
C'est un piège!
[ *  *  *  *  *  * ]
Hi,

If you wish to change the username colors of your members based on which usergroup they are in, please see this documentation.

If you have any further questions, feel free to ask.
Offline Profile Quote Post Goto Top
 
Brez
Member
[ * ]
Hi,

I understand that much. But that only changes it on the Topic view part of the board and not anywhere else. The code I am using above reproduces the code everywhere on the forums as you could see here for example: http://puu.sh/avG8

Though, that the original code only allows me to change each member individually. What I'm asking essentially is if there is a way to alter the code to change it for a group, not the individual member #. He claims there is a way in the topic I found the code in, but doesn't specify how. Here is the topic for your viewing pleasure or reference: http://support.zetaboards.com/topic/27065/1/
Edited by Brez, Dec 12 2011, 06:10 PM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards - Theme & Code Support · Next Topic »
Add Reply