Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
VB4 Rainbow Name Animation Details »»
VB4 Rainbow Name Animation
Version: 1.00, by MrRedDoT MrRedDoT is offline
Developer Last Online: Oct 2020 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 4.2.0 Rating:
Released: 06-14-2012 Last Update: Never Installs: 7
Template Edits
Re-useable Code Code Changes Additional Files Translations Is in Beta Stage  
No support by the author.

Rainbow Animated Usergroup Effect


This is a thought i had a long time ago from a Call of Duty Wold at War Challenge lobby infection that allows your GAMER name to have a Rainbow animated effect. I have searched everywhere for this but never found it. Thanks to Relevant For Coding this to work with site.

This will Take less than 2 minutes to install

Enjoy,


Installation


Step 1. FTP to forums/clientscript/vbulletin-forumhome.js and copy code to bottom.


PHP Code:
/*    Relevant / MrRedDoT  - Modified for ReddotCity
  Fixed for multiple instances by Rele <3 */
var toSpans=0,rainbowSpan=0,rainbows=[];  
function 
startRainbow(){
  
toSpans = function(span) {
   try{
      var 
str=span.firstChild.data;
      var 
a=str.length;
      
span.removeChild(span.firstChild);
      for(var 
i=0i<ai++) {
      var 
theSpan=document.createElement("SPAN");
      
theSpan.appendChild(document.createTextNode(str.charAt(i)));
      
span.appendChild(theSpan);
      }
    }catch ( 
) { };
  }

  
RainbowSpan = function(spanhuedegbrtspdhspd) {
    try{
      
this.deg=(deg==null?360:Math.abs(deg));
      
this.hue=(hue==null?0:Math.abs(hue)%360);
      
this.hspd=(hspd==null?3:Math.abs(hspd)%360);
      
this.length=span.firstChild.data.length;
      
this.span=span;
      
this.speed=(spd==null?50:Math.abs(spd));
      
this.hInc=this.deg/this.length;
      
this.brt=(brt==null?255:Math.abs(brt)%256);
      
this.timer=null;
      
toSpans(span);
      
this.moveRainbow();
    }catch ( 
) { };
  }
  
  
RainbowSpan.prototype.moveRainbow = function() {
    if(
this.hue>359this.hue-=360;
    var 
color;
    var 
b=this.brt;
    var 
a=this.length;
    var 
h=this.hue;

    for(var 
i=0i<ai++) {

    if(
h>359h-=360;

    if(
h<60) { color=Math.floor(((h)/60)*b); red=b;grn=color;blu=0; }
    else if(
h<120) { color=Math.floor(((h-60)/60)*b); red=b-color;grn=b;blu=0; }
    else if(
h<180) { color=Math.floor(((h-120)/60)*b); red=0;grn=b;blu=color; }
    else if(
h<240) { color=Math.floor(((h-180)/60)*b); red=0;grn=b-color;blu=b; }
    else if(
h<300) { color=Math.floor(((h-240)/60)*b); red=color;grn=0;blu=b; }
    else { 
color=Math.floor(((h-300)/60)*b); red=b;grn=0;blu=b-color; }

    
h+=this.hInc;

    
this.span.childNodes[i].style.color="rgb("+red+", "+grn+", "+blu+")";
    }
    
this.hue+=this.hspd;
  }
  
setInterval(procRainbow,500);
}
function 
procRainbow(){
  if(
document.querySelectorAll("[id=rainbow]").length 0)
  {
    var 
uglySpans document.querySelectorAll("[id=rainbow]");
    for(var 
i in uglySpans){try{var temp uglySpans[i].innerText.lengthuglySpans[i].id="rainbowed"rainbows.push(new RainbowSpan(uglySpans[i],03602555018)); } catch( ) { } }
    for(var 
i in rainbows){rainbows[i].timer setInterval("rainbows["+i+"].moveRainbow()"rainbows[i].speed);}
  }
}
setTimeout(startRainbow,500); 
Step 2.

Navigate to Admincp>Usergroup>Usergroup Manager> Choose a User group to edit and enter this code to Username HTML Markup:

PHP Code:
<span id='rainbow' style='font-weight:bold'RedDotCity </span

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-16-2012, 10:37 AM
GamerPerfection's Avatar
GamerPerfection GamerPerfection is offline
 
Join Date: Feb 2006
Posts: 389
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's going to look bad on a white or light background.
Reply With Quote
  #3  
Old 06-16-2012, 01:57 PM
LgsOfChampions's Avatar
LgsOfChampions LgsOfChampions is offline
 
Join Date: Feb 2011
Location: Leagues Of Champions
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I actually like the one's with the glow in the background. Anyway to share this also?
Reply With Quote
  #4  
Old 06-17-2012, 04:12 AM
iDHKHCM iDHKHCM is offline
 
Join Date: Aug 2011
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by LgsOfChampions View Post
I actually like the one's with the glow in the background. Anyway to share this also?
thats already on here somewhere
Reply With Quote
  #5  
Old 06-18-2012, 11:34 AM
RobbieZ RobbieZ is offline
 
Join Date: Jul 2008
Posts: 1,117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glow usernames are simple CSS.

https://vborg.vbsupport.ru/showthread.php?t=266408
Reply With Quote
  #6  
Old 06-18-2012, 10:23 PM
AK47- AK47- is offline
 
Join Date: Apr 2012
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update: credits are given nice share
Reply With Quote
  #7  
Old 06-20-2012, 09:40 PM
Menno11's Avatar
Menno11 Menno11 is offline
 
Join Date: Feb 2011
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have no vbulletin-forumhome.js in clientscript...
Reply With Quote
  #8  
Old 06-21-2012, 01:08 AM
CubicWebs CubicWebs is offline
 
Join Date: May 2012
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Menno11 View Post
i have no vbulletin-forumhome.js in clientscript...
Hey mate,

You need to create the file mate manually, then go to headerinclude template then put in

<script language="javascript" src="http://ForumURL/clientscript/vbulletin-forumhome.js"></script>
Reply With Quote
  #9  
Old 08-21-2012, 03:11 PM
tele955848 tele955848 is offline
 
Join Date: Nov 2008
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alles gemacht.
Name aber not Rainbow
Reply With Quote
  #10  
Old 09-02-2012, 07:23 PM
zyiad zyiad is offline
 
Join Date: Nov 2011
Location: Egypt
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

unfortunately is not working
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:45 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.07646 seconds
  • Memory Usage 2,355KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete