SMF For Free Support Forum
Signup For Free Forum
September 02, 2010, 11:40:54 pm
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Welcome to SMF For Free. The best free SMF Host
Home
Help
Search
Arcade
Gallery
Login
Register
SMF For Free Support Forum
>
SMF For Free Support
>
SMF For Free Codes and Support
(Moderator:
Agent Moose
) >
[Code] Color Usernames
Pages: [
1
]
2
« previous
next »
Print
Author
Topic: [Code] Color Usernames (Read 2674 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
Offline
Posts: 825
Do not PM me for Code Support or Request
[Code] Color Usernames
«
on:
November 28, 2008, 08:50:43 pm »
Footers:
Code:
<script>
function Color_Username(ethan,troy){
//Created by Agent Moose (revolutionx.smfforfree3.com)
var Vikhyat = document.links;
for(simply_sibyl=0;simply_sibyl<Vikhyat.length;simply_sibyl++){
if(Vikhyat[simply_sibyl].href.match("profile;u=" + ethan + "$")){
Vikhyat[simply_sibyl].style.color = troy;
};};};
Color_Username("ID","COLOR");
</script>
ID = The ID of the user
COLOR = The color for that user(You can use HEX)
Simple told me that alot of people wanted this, so I created it
It simply colors the username
Enjoy
Logged
Check out Revolution X's Brand new
Code Index
!
[JeReMy]
SMF For Free Master
Offline
Posts: 1174
www.ourhangout.org
Re: [Code] Color Usernames
«
Reply #1 on:
November 28, 2008, 09:51:32 pm »
Thx moose im sure ppl will enjoy it
Logged
www.ourhangout.org
www.ourhangout.org
www.ourhangout.org
Vitality
SMF For Free Member
Offline
Posts: 53
Revolution X
Re: [Code] Color Usernames
«
Reply #2 on:
November 28, 2008, 09:59:27 pm »
Similar code
?
Nonetheless effective. Nice work Moose
Logged
simply sibyl
Global Moderator
Offline
Posts: 13750
Re: [Code] Color Usernames
«
Reply #3 on:
November 28, 2008, 11:27:03 pm »
Quote from: Agent Moose on November 28, 2008, 08:50:43 pm
Simple told me that alot of people wanted this, so I created it
It simply colors the username
hey thanks Moose for whipping this up and getting it posted.... its been asked for several times lately.
(laughs as I noticed my names in the code)
Logged
Please Read ----->
Tips for Using Support
Support FAQ
|
Guides & Tutorials
Sudden Gunfire
SMF For Free Newbie
Offline
Posts: 2
Re: [Code] Color Usernames
«
Reply #4 on:
November 30, 2008, 04:54:48 pm »
Hey moose, didn't you create the guide on how to add RS crowns to the usernames. I know on that you can change the colour of the name and the actual name itself. You should code just those two together, without the image URL
I'm sure people will aprreciate that too. Cheers
- SG
Logged
Agent Moose
Moderator
Offline
Posts: 825
Do not PM me for Code Support or Request
Re: [Code] Color Usernames
«
Reply #5 on:
December 01, 2008, 02:49:42 pm »
Well, with this, it basically gets straight to the point. Also, this one goes my the user id, so you will not have to change the users name everytime the user changes there display name.
Logged
Check out Revolution X's Brand new
Code Index
!
Colette Brunel
SMF For Free Sr. Member
Offline
Posts: 423
Re: [Code] Color Usernames
«
Reply #6 on:
December 01, 2008, 03:31:05 pm »
Wouldn't an easier way to code this be appending a style attribute to the <a> element? You could do for example;
<a href="
http://mysite.com/?action=profile;u={}
" style="color: #ff0000;">Name</a>
While searching for the {} value (which can be searched by using find statements which look for ;u= and then takes the numerical (max num digits in case of outside junk like session)).
Logged
13583emma
SMF For Free Full Member
Offline
Posts: 100
http://welshworld.smfforfree.com
Re: [Code] Color Usernames
«
Reply #7 on:
February 03, 2009, 07:30:11 am »
do you have to use the hex or can you just type the name of the color in there?
Logged
Colette Brunel
SMF For Free Sr. Member
Offline
Posts: 423
Re: [Code] Color Usernames
«
Reply #8 on:
February 03, 2009, 01:36:59 pm »
Depends on the name of the color you mean. Colors like "blue", "red", "white", "yellow", "orange", etc will work. Colors like "dark brown", "light blue", etc. will not work.
Logged
simply sibyl
Global Moderator
Offline
Posts: 13750
Re: [Code] Color Usernames
«
Reply #9 on:
February 03, 2009, 02:06:44 pm »
Quote from: ccbtimewiz on February 03, 2009, 01:36:59 pm
Depends on the name of the color you mean. Colors like "blue", "red", "white", "yellow", "orange", etc will work. Colors like "dark brown", "light blue", etc. will not work.
Wouldn't all of the html color names work? light blue would be LightBlue (with no space) then it "should" work? List of them there:
http://www.w3schools.com/HTML/html_colornames.asp
Logged
Please Read ----->
Tips for Using Support
Support FAQ
|
Guides & Tutorials
Colette Brunel
SMF For Free Sr. Member
Offline
Posts: 423
Re: [Code] Color Usernames
«
Reply #10 on:
February 03, 2009, 02:13:22 pm »
Quote from: simply sibyl on February 03, 2009, 02:06:44 pm
Quote from: ccbtimewiz on February 03, 2009, 01:36:59 pm
Depends on the name of the color you mean. Colors like "blue", "red", "white", "yellow", "orange", etc will work. Colors like "dark brown", "light blue", etc. will not work.
Wouldn't all of the html color names work? light blue would be LightBlue (with no space) then it "should" work? List of them there:
http://www.w3schools.com/HTML/html_colornames.asp
Note: The names above are not a part of the W3C web standard.
The W3C HTML and CSS standards have listed only 16 valid color names:
aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow.
Logged
13583emma
SMF For Free Full Member
Offline
Posts: 100
http://welshworld.smfforfree.com
Re: [Code] Color Usernames
«
Reply #11 on:
February 03, 2009, 05:59:54 pm »
Thx All at least now i know lol
Logged
Pan
SMF For Free Member
Offline
Posts: 33
Re: [Code] Color Usernames
«
Reply #12 on:
May 13, 2009, 12:23:50 am »
Can I Bold the name or italic it?
Can you give me the code?
Logged
simply sibyl
Global Moderator
Offline
Posts: 13750
Re: [Code] Color Usernames
«
Reply #13 on:
May 13, 2009, 12:35:27 am »
Quote from: Pan on May 13, 2009, 12:23:50 am
Can I Bold the name or italic it?
Can you give me the code?
This code is not setup to do that. Possibly Moose could write a version that does but there are several others in the
Codes Index
Logged
Please Read ----->
Tips for Using Support
Support FAQ
|
Guides & Tutorials
riley
SMF For Free Member
Offline
Posts: 34
Re: [Code] Color Usernames
«
Reply #14 on:
May 20, 2009, 03:34:25 pm »
can you add adnother member to it?
Logged
please click eggs!!!!
Pages: [
1
]
2
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
SMF For Free Site
-----------------------------
=> Announcements
=> General Discussion
=> Suggestions
-----------------------------
SMF For Free Support
-----------------------------
=> General Support
=> Guides and Tutorials
=> Stylesheet Codes
=> Stylesheet Requests and Support
=> SMF For Free Codes and Support
===> Code Requests
=> Bugs
=> Report Terms of Service Violations
-----------------------------
General Stuff
-----------------------------
=> General Chat
=> Advertise Your Board/Blog
=> Programming
===> HTML
===> JavaScript
===> C,C++
===> Java
===> .Net
===> PHP
===> Visual Basic
=> Gaming
===> PC Games
===> Nintendo
===> Playstation
===> Xbox / Xbox 360
=> Graphics
===> Living Avatars
Loading...