Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

Reply
 
Thread Tools
Rainbow (Multicolour) Username for Usergroups Details »»
Rainbow (Multicolour) Username for Usergroups
Version: 1.00, by n.sinha.p n.sinha.p is offline
Developer Last Online: May 2012 Show Printable Version Email this Page

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:
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"> 
<!--
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!

Download Now

File Type: zip rainbowUsernames_v1.0.zip (127.4 KB, 1198 views)

Screenshots

File Type: jpg rainbowScreenshot.jpg (111.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Pixelduck

Comments
  #32  
Old 02-24-2009, 03:36 AM
Mellymonster Mellymonster is offline
 
Join Date: Oct 2008
Posts: 308
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bodaudinh View Post
Replace this code for rainbow.js. ^^ It'll be cool...

Code:
/**
Rainbow Text
**/
function RGB2Color(r,g,b)
{
  return '#' + byte2Hex(r) + byte2Hex(g) + byte2Hex(b);
}

function byte2Hex(n)
{
  var nybHexString = "0123456789ABCDEF";
  return String(nybHexString.substr((n >> 4) & 0x0F,1)) + nybHexString.substr(n & 0x0F,1);
}


function colorText(str,phase)
{
	var result="";
  if (phase == undefined)
    phase = 0;
  center = 128;
  width = 127;
  frequency = Math.PI*2/str.length;
  for (var i = 0; i < str.length; ++i)
  {
     red   = Math.sin(frequency*i+2+phase) * width + center;
     green = Math.sin(frequency*i+0+phase) * width + center;
     blue  = Math.sin(frequency*i+4+phase) * width + center;
     result += ( '<font color="' + RGB2Color(red,green,blue) + '">' + str.substr(i,1) + '</font>');
  }
  return result;
}

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;
    }
}
Use same as this mod...
Code:
<span class="rainbow">
add to footer//
Code:
<!-- rainbow text initialize -->
<script type="text/javascript"> 
<!--
nickmausac('rainbow');
//  End -->
</script>
<!-- rainbow text end -->
>> http://mytam.info/forum/member.php?u=50973


I have same as ideas by my sister, she asked me take her nickname has rainbow color... ^^
I would love to use this, but its not working correctly.
Reply With Quote
  #33  
Old 02-25-2009, 12:38 AM
Mellymonster Mellymonster is offline
 
Join Date: Oct 2008
Posts: 308
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I got the above to work, but now I'm having a problem with some of my members names does not catch it... Any idea what can be causing this?
Reply With Quote
  #34  
Old 02-25-2009, 06:00 AM
n.sinha.p n.sinha.p is offline
 
Join Date: Aug 2008
Location: System BIOS
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mellymonster View Post
Ok I got the above to work, but now I'm having a problem with some of my members names does not catch it... Any idea what can be causing this?
Did you use the js file I supplied or the one supplied by bodaudinh? If it is the code given by Bodaudinh, then sorry I do not own the code and hence would not be able to support. Try sending a PM to him. If it is about the code that I've posted, let me know the exact problem and I'll try to resolve it.
Reply With Quote
  #35  
Old 02-25-2009, 11:42 AM
celikforum celikforum is offline
 
Join Date: Dec 2007
Location: Turkey/Yozgat
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my problemm
Attached Images
File Type: jpg rain.JPG (11.5 KB, 0 views)
Reply With Quote
  #36  
Old 02-26-2009, 01:44 AM
DannyC55 DannyC55 is offline
 
Join Date: Feb 2007
Location: London, United Kingdom
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Users using IE are saying it doesn't work for them. It comes up undefined....
Please sort this.
Reply With Quote
  #37  
Old 02-26-2009, 05:16 PM
Neptun Neptun is offline
 
Join Date: Aug 2003
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have a problem with this hack

i installed everything like in the description ... but aber i change the tag in the usergroup

-> instead of the username is there "undefinedundefinedundefinedundefinedundefined "

what is going wrong or where is the probleme ?!


in IE i have the big problem - in firefox it works fine - what i have done wrong ?! (((
Reply With Quote
  #38  
Old 02-26-2009, 05:24 PM
DobieGillis? DobieGillis? is offline
 
Join Date: Feb 2009
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by YantieDan View Post
Users using IE are saying it doesn't work for them. It comes up undefined....
Please sort this.
it's an IE killer....
Reply With Quote
  #39  
Old 02-26-2009, 05:25 PM
DobieGillis? DobieGillis? is offline
 
Join Date: Feb 2009
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Neptun View Post
i have a problem with this hack

i installed everything like in the description ... but aber i change the tag in the usergroup

-> instead of the username is there "undefinedundefinedundefinedundefinedundefined "

what is going wrong or where is the probleme ?!


in IE i have the big problem - in firefox it works fine - what i have done wrong ?! (((
nothing, it just doesn't work with IE...I uninstalled it
Reply With Quote
  #40  
Old 02-26-2009, 05:41 PM
Neptun Neptun is offline
 
Join Date: Aug 2003
Posts: 113
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

has the coder no idea to fix the problem ?!
Reply With Quote
  #41  
Old 02-28-2009, 12:49 PM
n.sinha.p n.sinha.p is offline
 
Join Date: Aug 2008
Location: System BIOS
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is not compatible with usergroup legend hack.. I am working on making it a full blown mod so that it would change all the required templates.
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 11:26 AM.


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.15280 seconds
  • Memory Usage 2,339KB
  • Queries Executed 26 (?)
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
  • (7)bbcode_code
  • (4)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete