vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Forum Display Enhancements - Rainbow (Multicolour) Username for Usergroups (https://vborg.vbsupport.ru/showthread.php?t=204838)

elteejay 02-11-2012 03:32 PM

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 -->


irfan72 07-04-2012 11:19 AM

Thanks dude, awesome sharing :)

CoffeeLovesYou 09-11-2012 06:47 PM

How would I make this just be green and red? Instead of all of the other colours?

XGC Paravain 10-28-2012 04:38 PM

Will this work with vb 4.2.0?

OUTL4W 12-12-2013 12:36 PM

Quote:

Originally Posted by XGC Paravain (Post 2376594)
Will this work with vb 4.2.0?

look at post 75 in this thread

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.


All times are GMT. The time now is 01:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01019 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete