CåñåÐå™
Senior Poster
[M:0]
v5 Beta Tester
Posts: 74
|
Post by CåñåÐå™ on Dec 30, 2010 2:48:19 GMT
I'll like a code that will make the admin username in bold , please.
Thanks.
|
|
Cam!
VIP
[M:5000]
Posts: 780
|
Post by Cam! on Dec 30, 2010 4:26:56 GMT
All administrators of the forum, or just the main administrator?
|
|
CåñåÐå™
Senior Poster
[M:0]
v5 Beta Tester
Posts: 74
|
Post by CåñåÐå™ on Dec 30, 2010 5:13:06 GMT
|
|
Cam!
VIP
[M:5000]
Posts: 780
|
Post by Cam! on Dec 30, 2010 22:04:29 GMT
I guess you are the "Legend" guy on the forum? I know of codes that will already do this for you, do you want a coder to make one, or do you want a code that has already been made?
|
|
CåñåÐå™
Senior Poster
[M:0]
v5 Beta Tester
Posts: 74
|
Post by CåñåÐå™ on Dec 30, 2010 23:59:22 GMT
Yeah i'm him lol.
If it works i'll use it. would there also be one that will make it bold and br able to have different color?
|
|
Cam!
VIP
[M:5000]
Posts: 780
|
Post by Cam! on Dec 31, 2010 4:47:25 GMT
|
|
CåñåÐå™
Senior Poster
[M:0]
v5 Beta Tester
Posts: 74
|
Post by CåñåÐå™ on Dec 31, 2010 13:08:24 GMT
I tried both codes you gave me the bold works , but not the color .
|
|
Cam!
VIP
[M:5000]
Posts: 780
|
Post by Cam! on Dec 31, 2010 19:27:56 GMT
Wow, one of California's codes doesn't work. I am shocked.
Try this:
<script type="text/javascript"> <!-- /* color member names */ function colorName(name,color) { var a = document.getElementsByTagName('a'); for (i=0; i<a.length; i++) { if (a.item(i).href.match(new RegExp('action=viewprofile&user='+name + '$', 'i'))) { if(a.item(i).hasChildNodes() && a.item(i).firstChild.nodeType == 1) a.item(i).firstChild.style.color=color; a.item(i).style.color=color; } } }
colorName("Username", "HEX COLOR WITH NO # AT BEGINNING");
// --> </script>
|
|
CåñåÐå™
Senior Poster
[M:0]
v5 Beta Tester
Posts: 74
|
Post by CåñåÐå™ on Dec 31, 2010 20:22:30 GMT
Wow, one of California's codes doesn't work. I am shocked. Try this: <script type="text/javascript"> <!-- /* color member names */ function colorName(name,color) { var a = document.getElementsByTagName('a'); for (i=0; i<a.length; i++) { if (a.item(i).href.match(new RegExp('action=viewprofile&user='+name + '$', 'i'))) { if(a.item(i).hasChildNodes() && a.item(i).firstChild.nodeType == 1) a.item(i).firstChild.style.color=color; a.item(i).style.color=color; } } }
colorName("Username", "HEX COLOR WITH NO # AT BEGINNING");
// --> </script>
That worked perfectly Cmt , thanks alot . Happy New Year.
|
|
Jordan
Elite Poster
[M:5000]
Posts: 286
|
Post by Jordan on Dec 31, 2010 21:00:57 GMT
Wow, one of California's codes doesn't work. I am shocked.] His code used to work perfectly, but a few years back Proboards added a font tag for colored member names inside the anchor tag which his code does not check for. In the last code you posted it has a check for that particular scenario. if(a.item(i).hasChildNodes() && a.item(i).firstChild.nodeType == 1)
|
|