Rainbow Username

Professor

Active Member
Reputation
0
Not my content so don't come to me if something is not working.



Go to ACP > Templates & Style > Your Themes Templates > Ungrouped Templates > headerinclude:
If you don't have it, add:

Code:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

Next add:

Code:
<script>
(function(e){e.fn.rainbow=function(t){this.each(function(){t.originalText=e(this​).html();t.iterations=0;if(!t.pauseLength){t.pauseLength=t.animateInterval}e(thi​s).data("options",t);if(t.pad){for(x=0;x<t.originalText.length;x++){t.colors.unshift(t.colors[t.colors.length-1])}}e.fn.rainbow.render(this)})};e.fn.pauseRainbow=function(){this.each(function(​){var t=e(this).data("options");if(t){t.animate=false;e(this).data("options",t)}})};e.fn.resumeRainbow=function(){this.each(function(){var t=e(this).data("options");if(t){t.animate=true;e(this).data("options",t);e.fn.rainbow.render(this)}})};e.fn.rainbow.render=function(t){var n=e(t).data("options");var r=n.originalText.split("");n.iterations++;var i="";var s=0;for(var o in r){if(r[o]!=" "){i=i+'<span style="color: '+n.colors[s]+';">'+r[o]+"</span>";s++}else{i=i+" "}if(s>=n.colors.length){s=0}}e(t).html(i);var u=n.iterations%n.colors.length==0;if(n.animate){(function(t,n){var r=e(t).data("options");var i=setTimeout(function(){e.fn.rainbow.shift(t)},n);r.interval=i;e(t).data("options",r)})(t,u?n.pauseLength:n.animateInterval)}};e.fn.rainbow.shift=function(t){var n=e(t).data("options");var r=n.colors.pop();n.colors.unshift(r);e.fn.rainbow.render(t)}})(jQuery)
</script>
<script>
// Change options here!
$('.rainbow').rainbow({
 colors: [
 '#FF0000',
 '#f26522',
 '#fff200',
 '#00a651',
 '#28abe2',
 '#2e3192',
 '#6868ff'
 ],
 animate: true,
 animateInterval: 100,
 pad: false,
 pauseLength: 100
});
// End change options
</script>

Finally, go to ACP > Users & Groups > Groups > Your Group > and change Username Style to:

Code:
<span class="rainbow">{username}</span>
 
I was actually wondering how this was done. I only knew how to do it on posts and threads and didn't know if it was able to be done on the usernames. Thanks for the share, buddy!
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…