Version: 1.00, by n.sinha.p
Developer Last Online: May 2012
Category: Forum Display Enhancements -
Version: 3.8.1
Rating:
Released: 02-09-2009
Last Update: Never
Installs: 114
Template Edits
Re-useable Code Additional Files Translations
No support by the author.
Info:
Rainbow effect (Multicolour) for Usernames
This simple hack enables to display usernames for any usergroup in random multicolour (rainbow) effect.
Having searched for the same effect for my board unsuccessfully where most of the modifications were for BBCodes, I came up with my own and though of sharing.
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.
Installation:
Time Required: 2 minutes
1. FTP rainbow.js to clientscript directory on your server in ASCII mode
2. Open headinclude template and add the following code at any reasonable place:
3. Open footer template and add the following code at the bottom:
Code:
<!-- rainbow text initialize -->
<script type="text/javascript">
<!--
rain();
// End -->
</script>
<!-- rainbow text end -->
4. Open the Usergroup Manager throug ACP and edit the desired user group.
5. Put start tag as:
Code:
<span class="rainbow">
6. Change the end tag to be:
Code:
</span>
You're Done! Enjoy!!
Versions: v1.0 - 10 February 2009
- Rainbow text effect for usernames
I may think of creating a plugin for this if I get time and people ask for it. But for now it is pretty simple and I would prefer having a hack rather than going for a plugin which would increase the load on your board's performance.
A Note: If you are using vbshout.. the effect will not show in the AJAX area. However, it will still display the usernames in the AJAX area and the rainbow effect will be available in shoutbox archive.
:up:Added & hidden bonus is that you can use this hack anywhere where you can use HTML code.. in almost any area you can think of!
If you want to choose your own specific colors to go through it here is a quick mod. replace the array colors with either color names or #hexcodes.
Code:
<!--
// ####################################################
// ######## RainBow Text Effect for UserNames #########
// ################# By Neeraj Sinha ##################
// ### Please leave these comments if you are using ###
// ##### http://apnigang.com/forums/index.php #####
// ####################################################
function rain()
{
var aspans = document.getElementsByTagName('span');
for (var i = 0; i < aspans.length; i++)
{
if (aspans[i].className =='rainbow')
{
var words=aspans[i].innerHTML;
var spacer="";
var rainText="";
var colourscheme=new Array("magenta","gold","white","blue","red","green","yellow","orange","gray","purple","pink","lime","cyan","teal","indigo","lightblue")
for(var ch=0;ch<=(words.length-1);ch++){
var c1=Math.round(Math.random()*(colourscheme.length-1));
rainText+="<strong><font color=\""+colourscheme[c1]+"\">"+words[ch]+"</font></strong>";
}
aspans[i].innerHTML=rainText;
}
}
}
// End -->
sorry to bump such an old thread....but how to show the specific colors and not in random sequence when page is loaded?....would like to use specific gradient colors.