View Full Version : Forum Display Enhancements - [bmw] Rainbow (Gradient) Username for Usergroups
bodaudinh
03-13-2009, 10:00 PM
This simple hack enables to display usernames for any usergroup in rainbow effect.
Please note that since it is based on pure HTML and JavaScript and in no way uses any BBcode of VB function/hooks, this is compatible with all versions of vBulletin.
You can use it as HTML with: <span class="rainbow"> your content </span>
Installation:
Time Required: 3 minutes
1. Upload clientscript directory (included rainbow.js) on your server in ASCII mode
2. Open headinclude template and add the following code at any reasonable place:
Code:
<script type="text/javascript" src="$vboptions[bburl]/clientscript/rainbow.js"></script> 3. Open footer template and add the following code at the bottom:
Code:
<!-- rainbow text initialize -->
<script type="text/javascript">
<!--
nickmausac('rainbow');
// End -->
</script>
<!-- rainbow text end --> 4. Open the Usergroup Manager throug ACP and edit the desired user group.4.1 -Put start tag as:
Code:
<span class="rainbow"> 4.2 Change the end tag to be:
Code:
</span> You're Done! Enjoy!!
Thanks:
- jim bumgardner (http://krazydad.com/makecolors.php)
- n.sinha.p (https://vborg.vbsupport.ru/member.php?u=268729) (Instruction of your mods (https://vborg.vbsupport.ru/showthread.php?t=204838&page=4), my English's bad :( )
DobieGillis?
03-14-2009, 10:59 AM
does this one work in IE?
DobieGillis?
03-14-2009, 11:28 AM
works under IE but all usernames have exactly the same colors in order, no variations.
bodaudinh
03-14-2009, 11:32 AM
Please check it, with your IE
=> http://mytam.info/forum/member.php?u=50973
If u got problem, plz PM or post your link, I'll check & fix 2u.
bodaudinh
03-14-2009, 11:34 AM
works under IE but all usernames have exactly the same colors in order, no variations.
Close tag </span> (step. 4.2) ? in Usergroup
DobieGillis?
03-14-2009, 11:35 AM
Please check it, with your IE
=> http://mytam.info/forum/member.php?u=50973
If u got problem, plz PM or post your link, I'll check & fix 2u.
It works with IE, no problems, just no variations in the user colors.
DobieGillis?
03-14-2009, 11:37 AM
Close tag </span> (step. 4.2) ? in Usergroup
yes sir. The names are all in different colors, not the problem. It's just that they all follow the same color span, they start with light green and go from there, same pattern for all.
DobieGillis?
03-14-2009, 11:38 AM
they look exactly like your screen shot. I remember the first Rainbow script would vary the colors in the names each time you refreshed,
bodaudinh
03-14-2009, 12:18 PM
If you want to variations in your color, you can do follow instruction below:
Edit file rainbow.js:
find Line 44:
function nickmausac(classname){
var txtValue = "";
var b = getElementsByClassName(classname);
for ( var i = 0; i < b.length; i++ ) {
txtValue = colorText(b[i].innerHTML,1);
b[i].innerHTML = txtValue;
}
}
Change :
txtValue = colorText(b[i].innerHTML,1);To (1 => i):
txtValue = colorText(b[i].innerHTML,i);Result:
function nickmausac(classname){
var txtValue = "";
var b = getElementsByClassName(classname);
for ( var i = 0; i < b.length; i++ ) {
txtValue = colorText(b[i].innerHTML,i);
b[i].innerHTML = txtValue;
}
}
DobieGillis?
03-14-2009, 12:35 PM
thank you
DobieGillis?
03-14-2009, 12:42 PM
If you want to variations in your color, you can do follow instruction below:
Edit file rainbow.js:
find Line 44:
function nickmausac(classname){
var txtValue = "";
var b = getElementsByClassName(classname);
for ( var i = 0; i < b.length; i++ ) {
txtValue = colorText(b[i].innerHTML,1);
b[i].innerHTML = txtValue;
}
}
Change :
txtValue = colorText(b[i].innerHTML,1);To (1 => i):
txtValue = colorText(b[i].innerHTML,i);Result:
function nickmausac(classname){
var txtValue = "";
var b = getElementsByClassName(classname);
for ( var i = 0; i < b.length; i++ ) {
txtValue = colorText(b[i].innerHTML,i);
b[i].innerHTML = txtValue;
}
}
works like a charm
y2krazy
03-16-2009, 01:19 PM
Installed and working well. <3
~ Sean
SliceofLife
03-25-2009, 04:13 AM
This one doesn't work either.
Frondy
03-25-2009, 09:26 AM
It works, txnx!
To make it e.g. bold:
<span class="rainbow" style= "font-weight: bold">
Jasem
03-25-2009, 11:11 PM
good job, thank you
Installed
SliceofLife
03-26-2009, 12:07 AM
Nevermind my previous post! This is working brilliantly! The other one didn't work at all, but this one is working and my users are in heaven! Thanks heaps!
Hornstar
04-12-2009, 10:29 PM
Is there a way to automate the template edit? that way when I upgrade I don't forget to do this. thanks.
Hornstar
04-12-2009, 11:48 PM
I thought it wasnt working but then realised it just took a few extra seconds to load the rainbow affect over the username. Thanks.
pincrackergod
05-29-2009, 01:58 AM
How do I : 1. Upload clientscript directory (included rainbow.js) on your server in ASCII mode??
I have FTP access, but how do I do that, just in the forum? or a specific place?
bodaudinh
05-29-2009, 03:49 AM
How do I : 1. Upload clientscript directory (included rainbow.js) on your server in ASCII mode??
I have FTP access, but how do I do that, just in the forum? or a specific place?
Yup! Upload folder clientscript in your forum.
Mellymonster
06-11-2009, 11:16 PM
Um lol ok I followed the directions, and it is not working at all for me...
<span class="rainbow" style= "font-weight: bold"> </span>
is what I used I see the bold but no rainbow, I upload the js file in the clientscript folder of my ftp under "ASCII" I did the footer and headinclude templates, and its not working :(
DeadRabbit
08-08-2009, 08:19 AM
Why are the usernames not able to be seen in rainbow color in Cyb - Chatobox?
any possible way to get this to work with 4.0?
malipl
03-04-2010, 07:00 PM
does work to 4.02???
malipl
03-04-2010, 07:14 PM
Bump
fevredsuk
06-17-2010, 08:49 PM
I get rainbow colours in
currently active list
postbin
profile
usergroup colorbar
mgc chatbox evo archive
I dont get rainbow colours in
active in last 24 hours list
mgc chatbox - main chat page
cyb advanced stats
anyone now why this is and how i can make the last 3 rainbow coloured
thanks
BirdOPrey5
07-16-2010, 10:21 AM
Seems like this could easily be made into a bbcode by making a bbcode that says:
<span class="rainbow">{param}</span>
Any reason that wouldn't work if this mod was already installed?
RobbieZ
07-27-2010, 05:06 PM
Thanks , working on vb4 with a small edit of mine :D
fevredsuk
08-07-2010, 10:33 AM
Thanks , working on vb4 with a small edit of mine :D
what did you edit
BirdOPrey5
08-07-2010, 06:34 PM
what did you edit
The only thing different in vb4 would be the line:
<script type="text/javascript" src="$vboptions[bburl]/clientscript/rainbow.js"></script>
Which is not the smartest way of doing this anyway, you should just edit it to the URL of your forum, something like:
<script type="text/javascript" src="/forums/clientscript/rainbow.js"></script>
if your forum is in the "/forums/" directory or just:
<script type="text/javascript" src="/clientscript/rainbow.js"></script>
if your forums are in the root. That will work on vb3 or 4.
s-p0k
08-08-2010, 01:07 AM
how do you use it as an ...HTML with: <span class="rainbow"> your content </span>
fevredsuk
08-08-2010, 12:34 PM
The only thing different in vb4 would be the line:
<script type="text/javascript" src="$vboptions[bburl]/clientscript/rainbow.js"></script>
Which is not the smartest way of doing this anyway, you should just edit it to the URL of your forum, something like:
<script type="text/javascript" src="/forums/clientscript/rainbow.js"></script>
if your forum is in the "/forums/" directory or just:
<script type="text/javascript" src="/clientscript/rainbow.js"></script>
if your forums are in the root. That will work on vb3 or 4.
Thankyou. works like it did on vb3 now
dont suppose thers anyway of getting rainbow to show up in chatbox and active in last 24 hours
BirdOPrey5
08-08-2010, 12:37 PM
Sorry, I wouldn't know about those. :(
fevredsuk
08-08-2010, 03:30 PM
no worries, shows up in last 24 hours list any way this time , but not cb
Emeralda
11-11-2011, 02:53 PM
After I did a clean install on the same server and with the same vB install, rainbows suddenly stopped working. I put the .js file back in the clientscript, templates still had the old changes, so I'm not sure what's wrong.
PS. What's that ASCII mode?
great kitten
08-31-2013, 12:44 AM
i just see the colour static, and not in movement.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.