Hello guys,
I want a rainbow username on my forums how do I do it?
I've not seen a working method to doing this yet.
I posted this thread a week ago and didn't get much out of it so I've posting this one also.
yeah, that doesn't seem to work.
How did you integrate the script ?
___________
EDIT:
I've tested it.....it works!
[
attachment=33246]
The way:
Download the attached rainbow.min.js and copy file into jscripts folder on server.
Open your theme template
headerinclude and add the following lines right above
{$stylesheets}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/rainbow.min.js"></script>
<script type="text/javascript">//<![CDATA[
$(window).load(function(){
$('#group_1').rainbow({
colors: ['#FF0000','#f26522','#fff200','#00a651','#28abe2','#2e3192','#6868ff']
});
});//]]>
</script>
Open in ACP > Users & Groups > Groups > the group you want to edit > and change Username Style with e.g.
<span id="group_1" style="font-weight:bold">{username}</span>
_____
All credits for the rainbow script go to xoxco.
(2014-12-10, 09:51 PM)SvePu Wrote: [ -> ]How did you integrate the script ?
___________
EDIT:
I've tested it.....it works!
The way:
Download the attached rainbow.min.js and copy file into jscripts folder on server.
Open your theme template headerinclude and add the following lines right above {$stylesheets}
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/rainbow.min.js"></script>
<script type="text/javascript">//<![CDATA[
$(window).load(function(){
$('#group_1').rainbow({
colors: ['#FF0000','#f26522','#fff200','#00a651','#28abe2','#2e3192','#6868ff']
});
});//]]>
</script>
Open in ACP > Users & Groups > Groups > the group you want to edit > and change Username Style with e.g.
<span id="group_1" style="font-weight:bold">{username}</span>
_____
All credits for the rainbow script go to xoxco.
What do I put for username style.
<span id="group_1" style="font-weight:bold">{username}</span>
You can't use the same id on multiple elements on the same page; much better using a class.
You're right - I didn't thought about that...it was late ^^
Using classes is also possible.
<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>
Thanks for that but the rainbow is not flashing or anything, I want the username to sorta go through loads of different colours so I want it to cycle through the different colours.