Multi-Colored Usernames?
Chemical Accident Offline
Junior Member
**
Posts: 7
Joined: Jul 2011
Post: #1
Multi-Colored Usernames?
I've tried everything I know to try to get "Multi-Colored" usernames, but can't figure out a way to achieve this without having to use an image :/

I know there's a Javascript to make your username have each character a completely random color, but I need it to where I can pick the specific colors. What I'm trying to achieve is "DevilsParada89"

Help is appreciated!
(This post was last modified: 07-18-2011 11:18 AM by Chemical Accident.)
07-18-2011 11:16 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Multi-Colored Usernames?
Well Javascript isn't an ideal solution since it would require clients to have it enabled; this really should be done server side.

If it's just one username, stick it in a custom group and make the name formatting the appropriate HTML.
If it's a range of usernames, well, that'll require some coding...

My Blog
07-18-2011 12:42 PM
Find all posts by this user Quote this message in a reply
Chemical Accident Offline
Junior Member
**
Posts: 7
Joined: Jul 2011
Post: #3
RE: Multi-Colored Usernames?
That's my problem, there's only so much it'll actually save before it cuts it off :/
07-18-2011 12:45 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Multi-Colored Usernames?
Edit your database: change the namestyle column of mybb_usergroups - by default, the max length is 200, so change it to something large enough to hold the name.
If you get an error asking you to put {username} in there, you can just wrap comment tags around it.

My Blog
(This post was last modified: 07-18-2011 02:13 PM by ZiNgA BuRgA.)
07-18-2011 02:11 PM
Find all posts by this user Quote this message in a reply
Chemical Accident Offline
Junior Member
**
Posts: 7
Joined: Jul 2011
Post: #5
RE: Multi-Colored Usernames?
Thank you! Finally got it thanks to you! No one else on the MyBB Community Forums seemed to know, or they said it was impossible. Thanks again Smile
One last question. Before I changed it, I had an image for his username which looks practically the same, except it was an image. Whenever I go to a thread where he's posted, his name is still the image, but everywhere else it's actual text. Anyway to fix this?
(This post was last modified: 07-19-2011 01:54 AM by Chemical Accident.)
07-18-2011 03:22 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Multi-Colored Usernames?
Do you mean you had an <img> tag in the username style for the group?
If so, MyBB doesn't use username styles everywhere, so in some places (such as last post) it'll display the plaintext version.  Do you want the image to be used in these places?

My Blog
07-18-2011 03:42 PM
Find all posts by this user Quote this message in a reply
Chemical Accident Offline
Junior Member
**
Posts: 7
Joined: Jul 2011
Post: #7
RE: Multi-Colored Usernames?
No, I had the <img> tag in the username style for the group previously. But now I've changed it, however, in the post area, in the actual thread(postbit I think is what it's called), it's still showing the old username image I had, instead of the new text.
07-19-2011 01:44 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #8
RE: Multi-Colored Usernames?
Either your user is a part of multiple groups or you did the modification into the postbit template itself.

My Blog
07-19-2011 08:11 AM
Find all posts by this user Quote this message in a reply
Chemical Accident Offline
Junior Member
**
Posts: 7
Joined: Jul 2011
Post: #9
RE: Multi-Colored Usernames?
Fixed the problem. Had an old plugin active I never deactivated.
(This post was last modified: 07-19-2011 10:40 AM by Chemical Accident.)
07-19-2011 10:29 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: