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 - [bmw] Rainbow (Gradient) Username for Usergroups (https://vborg.vbsupport.ru/showthread.php?t=208274)

bodaudinh 03-13-2009 10:00 PM

[bmw] Rainbow (Gradient) Username for Usergroups
 
1 Attachment(s)
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:
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:
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:
Code:

<span class="rainbow">
4.2 Change the end tag to be:
Code:
Code:

</span>
You're Done! Enjoy!!

Thanks:
- jim bumgardner (http://krazydad.com/makecolors.php)
-
n.sinha.p (Instruction of your mods, 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

1 Attachment(s)
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

Quote:

Originally Posted by DobieGillis? (Post 1767782)
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

Quote:

Originally Posted by bodaudinh (Post 1767785)
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

Quote:

Originally Posted by bodaudinh (Post 1767787)
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:
Code:

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

txtValue = colorText(b[i].innerHTML,1);
To (1 => i):
Code:

txtValue = colorText(b[i].innerHTML,i);
Result:
Code:

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

Quote:

Originally Posted by bodaudinh (Post 1767829)
If you want to variations in your color, you can do follow instruction below:

Edit file rainbow.js:

find Line 44:
Code:

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

txtValue = colorText(b[i].innerHTML,1);
To (1 => i):
Code:

txtValue = colorText(b[i].innerHTML,i);
Result:
Code:

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

Quote:

Originally Posted by pincrackergod (Post 1819230)
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?

Snug 01-15-2010 02:14 PM

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:

Code:

<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

Quote:

Originally Posted by RobbieZ (Post 2075391)
Thanks , working on vb4 with a small edit of mine :D

what did you edit

BirdOPrey5 08-07-2010 06:34 PM

Quote:

Originally Posted by fevredsuk (Post 2080468)
what did you edit

The only thing different in vb4 would be the line:

Code:

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

Code:

<script type="text/javascript" src="/forums/clientscript/rainbow.js"></script>
if your forum is in the "/forums/" directory or just:

Code:

<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

Quote:

Originally Posted by BirdOPrey5 (Post 2080584)
The only thing different in vb4 would be the line:

Code:

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

Code:

<script type="text/javascript" src="/forums/clientscript/rainbow.js"></script>
if your forum is in the "/forums/" directory or just:

Code:

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


All times are GMT. The time now is 04:54 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.01293 seconds
  • Memory Usage 1,815KB
  • 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
  • (19)bbcode_code_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (36)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete