Title: Change Username Colors Across Board Post by: Vitality on November 11, 2008, 10:47:20 pm If you're an admin, and your group color is red, this will find every link to your profile, and change the color of it to the color the group; in this case, it would be red. You can have multiple names colored, and in different colors.
Code: <script> All you need to edit is that line at the bottom, right before the final script tag./*Change username colors across board by Vitality of TCZ || Revolution X*/ var a = document.getElementsByTagName('a') function changer (xid,xuser,xcolor){ for(i=0,n=a.length;i<n;i++){ if(a[i].href.match(xid) && a[i].innerHTML.match(xuser)){ a[i].style.color=xcolor }}} changer("u=1","Vitality","blue"); </script> Here is the outline if you're unsure of what goes where/if you'd like to add more (for reference): Code: changer("u=#","USERNAME","COLOR"); Enjoy! Title: Re: Change Username Colors Across Board Post by: Spoken on November 12, 2008, 08:35:33 am Awesome! Im gonna use it!
Title: Re: Change Username Colors Across Board Post by: Mr_Smith on November 13, 2008, 01:59:28 pm Headers or footers? huh?
Title: Re: Change Username Colors Across Board Post by: Agent Moose on November 13, 2008, 03:25:33 pm Footers.
Also, why don't you make it just go by the user number and not the whole URL? Also, If the user changes their desplay name, you will have to change that section of the code. Title: Re: Change Username Colors Across Board Post by: Vitality on November 13, 2008, 04:58:52 pm EDIT: A newer version is updated in the first post. It's a bit faster, smaller and more efficient!
Title: Re: Change Username Colors Across Board Post by: Mr_Smith on November 26, 2008, 12:12:56 pm changer("u=1","Vitality","blue");
What needs to stand in that: 1 shown in red? Title: Re: Change Username Colors Across Board Post by: deathwilldie on November 26, 2008, 01:48:37 pm That means the user number. Just get the User number for the user and put that in it.
Title: Re: Change Username Colors Across Board Post by: Mr_Smith on November 26, 2008, 02:46:19 pm alright... tyvm ;D hehe
Title: Re: Change Username Colors Across Board Post by: Mojobojo82 on June 22, 2009, 03:55:41 am Cool code. I use it for my Forum Shop :P |