SMF For Free Support Forum
Signup For Free Forum
July 04, 2009, 11:30:38 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

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  

Pages: [1] 2
  Print  
Author Topic: [Code] Color Usernames  (Read 1652 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Moderator
*****
Offline Offline

Posts: 776


Do not PM me for Code Support or Request


View Profile
« 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 Smiley It simply colors the username Smiley

Enjoy

Logged

Want to know how good your board is?  Why not get it reviewed at Revolution X!
[JeReMy]
SMF For Free Master
*
Offline Offline

Posts: 1184


www.ourhangout.org


View Profile WWW
« Reply #1 on: November 28, 2008, 09:51:32 pm »

Thx moose im sure ppl will enjoy it
Logged

Vitality
SMF For Free Member
*
Offline Offline

Posts: 52


Revolution X


View Profile WWW
« Reply #2 on: November 28, 2008, 09:59:27 pm »

Similar code? Tongue
Nonetheless effective. Nice work Moose Wink
Logged

simply sibyl
Global Moderator
*
Offline Offline

Posts: 11806


On vacation until July 6th


View Profile WWW
« Reply #3 on: November 28, 2008, 11:27:03 pm »

Simple told me that alot of people wanted this, so I created it Smiley It simply colors the username Smiley

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

Some Helpful Links:
Support FAQ | Guides & Tutorials | Tips for Using Support
I do not do support via personal messages
Sudden Gunfire
SMF For Free Newbie
*
Offline Offline

Posts: 2



View Profile
« 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  Smiley I'm sure people will aprreciate that too. Cheers

- SG
Logged
Agent Moose
Moderator
*****
Offline Offline

Posts: 776


Do not PM me for Code Support or Request


View Profile
« 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

Want to know how good your board is?  Why not get it reviewed at Revolution X!
ccbtimewiz
SMF For Free Sr. Member
*
Offline Offline

Posts: 400


PK Flash!


View Profile WWW
« 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 Member
*
Offline Offline

Posts: 89


http://welshworld.smfforfree.com


View Profile WWW
« 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

ccbtimewiz
SMF For Free Sr. Member
*
Offline Offline

Posts: 400


PK Flash!


View Profile WWW
« 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 Offline

Posts: 11806


On vacation until July 6th


View Profile WWW
« Reply #9 on: February 03, 2009, 02:06:44 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

Some Helpful Links:
Support FAQ | Guides & Tutorials | Tips for Using Support
I do not do support via personal messages
ccbtimewiz
SMF For Free Sr. Member
*
Offline Offline

Posts: 400


PK Flash!


View Profile WWW
« Reply #10 on: February 03, 2009, 02:13:22 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 Member
*
Offline Offline

Posts: 89


http://welshworld.smfforfree.com


View Profile WWW
« 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 Offline

Posts: 33



View Profile WWW
« 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 Offline

Posts: 11806


On vacation until July 6th


View Profile WWW
« Reply #13 on: May 13, 2009, 12:35:27 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

Some Helpful Links:
Support FAQ | Guides & Tutorials | Tips for Using Support
I do not do support via personal messages
riley
SMF For Free Member
*
Offline Offline

Posts: 34



View Profile WWW
« 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  
 
Jump to:  

cheap low cost web hosting reviews

Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC
ServerBeach Coupon
Page created in 0.28 seconds with 17 queries.