inherit
48756
0
Jun 28, 2005 12:14:19 GMT -8
earendurcat
2
June 2005
earendurcat
|
Post by earendurcat on Jun 28, 2005 7:50:25 GMT -8
Ok, I'm wondering if it is possible to make the color of the adim or moderators user names skinable. I am currently using Craig's Moderator and Normal Member Name Color And Style from the Support board FAQ: With how it is now, I have to find colors that work on all skins, which I have done, but it would be really nice to be able to make the color that I want for each skin. So then I found this code on Solidsnake Designs: ssdesigns.proboards17.com/index.cgi?board=pbv4cross&action=display&thread=1116121852I was wondering if there was any way at all to sort of combine the two codes. If not, is it even possible to do what I'm talking about? Thanks in advance for any help
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Jun 28, 2005 10:21:59 GMT -8
Well I suppose you could add this in red to make the code only execute on a certain skin as a sort of fix. For example, that one will only use those colors when you're using the default skin. Then use a different one for each skin.
<script language=javascript> <!-- var username = document.getElementsByTagName('a'); function colorName(name,color,dstyle) { for (cn=0;cn<username.length;cn++) if (pb_skinid=="1" && username[cn].href.indexOf('action=viewprofile&user='+name) != -1){ username[cn].style.cssText=dstyle; username[cn].style.color=color; }}
colorName('admin','00ff00','font-weight: bold;'); // --> </script>
|
|
inherit
48756
0
Jun 28, 2005 12:14:19 GMT -8
earendurcat
2
June 2005
earendurcat
|
Post by earendurcat on Jun 28, 2005 12:15:17 GMT -8
Hey, thanks a lot! It works nicely ;D
|
|
inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Jun 28, 2005 13:07:19 GMT -8
You're welcome Glad it worked for you
|
|
inherit
Proboards Legend
212
0
May 11, 2006 12:32:55 GMT -8
california
21,035
December 1999
california
|
Post by california on Jun 28, 2005 23:36:43 GMT -8
But then it still loops through all the links in the document on other skins, just doesn't make the changes. This would be better:
<script language=javascript> <!-- var username = document.getElementsByTagName('a'); function colorName(name,color,dstyle) { for (cn=0;cn<username.length;cn++) if (username[cn].href.indexOf('action=viewprofile&user='+name) != -1){ username[cn].style.cssText=dstyle; username[cn].style.color=color; }}
if(pb_skinid==1){
colorName('admin','00ff00','font-weight: bold;');
} // --> </script>
That way the function isn't run for skin #2.
|
|