MyBB Community Forums

Full Version: Rainbow username
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Change the script in headerinclude from:

<script type="text/javascript" src="{$mybb->asset_url}/jscripts/rainbow.min.js"></script>
<script type="text/javascript">//<![CDATA[ 
$(window).load(function(){
    $('.YOURCLASSNAME').rainbow({    
            colors: ['#FF0000','#f26522','#fff200','#00a651','#28abe2','#2e3192','#6868ff']
        });
});//]]> 
</script> 

to:

<script type="text/javascript" src="{$mybb->asset_url}/jscripts/rainbow.min.js"></script>
<script type="text/javascript">//<![CDATA[ 
$(window).load(function(){
    $('.YOURCLASSNAME').rainbow({    
            colors: ['#FF0000','#f26522','#fff200','#00a651','#28abe2','#2e3192','#6868ff'],
			animate: true,
			animateInterval: 100,
			pad: false,
			pauseLength: 100,
        });
});//]]> 
</script>
(2014-12-13, 12:01 AM)SvePu Wrote: [ -> ]You're right - I didn't thought about that...it was late ^^

Using classes is also possible. Wink

<script type="text/javascript" src="{$mybb->asset_url}/jscripts/rainbow.min.js"></script>
<script type="text/javascript">//<![CDATA[ 
$(window).load(function(){
    $('.YOURCLASSNAME').rainbow({    
            colors: ['#FF0000','#f26522','#fff200','#00a651','#28abe2','#2e3192','#6868ff']
        });
});//]]> 
</script> 

<span class="YOURCLASSNAME" style="font-weight:bold">{username}</span>

What should I put as my class name, it works, the rainbow but it just says administators as my username on whos online
Try this:

<script type="text/javascript" src="{$mybb->asset_url}/jscripts/rainbow.min.js"></script>
<script type="text/javascript">//<![CDATA[ 
$(window).load(function(){
    $('.rainbow_username').rainbow({    
            colors: ['#FF0000','#f26522','#fff200','#00a651','#28abe2','#2e3192','#6868ff'],
            animate: true,
            animateInterval: 100,
            pad: false,
            pauseLength: 100,
        });
});//]]> 
</script>  

<span class="rainbow_username" style="font-weight:bold">{username}</span>
(2014-12-14, 05:39 PM)SvePu Wrote: [ -> ]Try this:


<script type="text/javascript" src="{$mybb->asset_url}/jscripts/rainbow.min.js"></script>
<script type="text/javascript">//<![CDATA[ 
$(window).load(function(){
    $('.rainbow_username').rainbow({    
            colors: ['#FF0000','#f26522','#fff200','#00a651','#28abe2','#2e3192','#6868ff'],
            animate: true,
            animateInterval: 100,
            pad: false,
            pauseLength: 100,
        });
});//]]> 
</script>  

<span class="rainbow_username" style="font-weight:bold">{username}</span>

Now its just displaying one of the usernames in whos online, My username is rated and my other admin is lust so its saying rated twice for me and lust.
Do you have the usename style replaced like:

<span class="rainbow_username" style="font-weight:bold">{username}</span>

[attachment=33294]

...or have you replaced {username} with your nickname??
(2014-12-14, 11:00 PM)SvePu Wrote: [ -> ]Do you have the usename style replaced like:


<span class="rainbow_username" style="font-weight:bold">{username}</span>



...or have you replaced {username} with your nickname??

I have the {username}.

Also Its still not working.
Link to the site?
Pages: 1 2