Ktulu
New Member
Posts: 6
inherit
224470
0
Oct 18, 2015 8:57:39 GMT -8
Ktulu
6
August 2015
ktuulu
|
Post by Ktulu on Oct 18, 2015 8:46:42 GMT -8
So, this code would not work for me at all, but then I realized that it stated at the top that those codes would not work for v5 forums. Is there a new way to do this?
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Oct 18, 2015 10:28:04 GMT -8
So, this code would not work for me at all, but then I realized that it stated at the top that those codes would not work for v5 forums. Is there a new way to do this? The closest thing we have in plugin form is Wormo's Color Smear. You can download it straight from your administration panel by going to the plugin library. If you are set on this code in particular you can post a request it be made in the plug in request board: support.proboards.com/board/38/plugins
|
|
inherit
225836
0
Dec 16, 2015 15:59:15 GMT -8
themaster1234
2
October 2015
themaster1234
|
Post by themaster1234 on Nov 4, 2015 17:54:48 GMT -8
<script type="text/javascript">
/* Rainbow usernames for groups or users, code found from
http://rainbowcoding.com/how-to-create-rainbow-text-in-html-css-javascript */
function color_from_hue(hue)
{
var h = hue/60;
var c = 255;
var x = (1 - Math.abs(h%2 - 1))*255;
var color;
var i = Math.floor(h);
if (i == 0) color = rgb_to_hex(c, x, 0);
else if (i == 1) color = rgb_to_hex(x, c, 0);
else if (i == 2) color = rgb_to_hex(0, c, x);
else if (i == 3) color = rgb_to_hex(0, x, c);
else if (i == 4) color = rgb_to_hex(x, 0, c);
else color = rgb_to_hex(c, 0, x);
return color;
}
function rgb_to_hex(red, green, blue)
{
var h = ((red << 16) | (green << 8) | (blue)).toString(16);
// add the beginning zeros
while (h.length < 6) h = '0' + h;
return '#' + h;
}
(function( $ ) {
$.fn.rainbowize = function() {
return this.each(function() {
var rainbowtext = '';
var hue=0;
var step=0;
// get the current text inside element
var text = $(this).text();
// hue is 360 degrees
if (text.length > 0)
step = 360 / (text.length);
// iterate the whole 360 degrees
for (var i = 0; i < text.length; i++)
{
rainbowtext = rainbowtext + '<span style="color:' + color_from_hue(hue) + '">' + text.charAt(i) + '</span>';
hue += step;
}
$(this).html(rainbowtext);
});
};
})( jQuery );
$(".group-1").rainbowize();
$(".user-2").rainbowize();
</script>
Go to this part of your forum, and paste this in Footer. /admin/structure/headers/category/0 The only part you have to edit are the last lines: $(".group-1").rainbowize(); $(".user-2").rainbowize(); If you DONT want the Custom title to be rainbowified, edit ths user and group to this: $(".user-link.group-1").rainbowize(); $(".user-link.user-2").rainbowize(); Found from: support.proboards.com/thread/496666/rainbow-username
|
|