EDIT: I have created a custom BBCode for this script so there is no need for installing the script inside of your skin template.
Original Post:
Hello,
Earlier, I showed you how you can make usernames on your forum flash in a "Rainbow" fashion. This tutorial will be very similar, but requires a few extra steps. This does not require "advanced" knowledge, just access to the Look & Feel and Member Groups section of your community's ACP.
Let's begin.
Firstly, you are going to navigate to ACP > Look & Feel > Your Skin > globalTemplate
This piece of code is to be inserted towards the bottom of the script. For example, you could place it just above where you see something relevant to <!-- ::: Footer ::: -->
<script>
var speed=80
var hex=new Array("00","14","28","3C","50","64","78","8C","A0","B4","C8","DC","F0")
var r=1
var g=1
var b=1
var seq=1
function changetext(){
for(i=0;i<document.getElementsByName("Rainbow").length;i++){
var storetext=document.getElementById? document.getElementsByName("Rainbow")[i] : document.all.highlight
rainbow="#"+hex[r]+hex[g]+hex[b]
storetext.style.color=rainbow
}
}
function change(){
if (seq==6){
b--
if (b==0)
seq=1
}
if (seq==5){
r++
if (r==12)
seq=6
}
if (seq==4){
g--
if (g==0)
seq=5
}
if (seq==3){
b++
if (b==12)
seq=4
}
if (seq==2){
r--
if (r==0)
seq=3
}
if (seq==1){
g++
if (g==12)
seq=2
}
changetext()
}
function starteffect(){
if (document.all||document.getElementById)
flash=setInterval("change()",speed)
}
starteffect()
</script>
Now to authorize user groups who can use the Rainbow text.
We're now going to navigate withing the ACP to Members > Member Groups > Manage Member Groups
This next step you will have to do for each group you want to be able to use this Rainbow text feature.
Open the group, click on "Global", look for "Can Post HTML?" and tick the box over to "Yes".
Save the group, and repeat as necessary.
Since we have enabled it for the user groups, we must permit it on the forums.
Let's work our way over to Forums > Manage Forums
Again, you must repeat these steps for each forum area you wish to allow the Rainbow feature.
Open the forum set you wish to apply the permissions to, and click on the Postable Settings tab.
The first option should be "Enable HTML Posting (where allowed)", place the setting over to "Yes".
Save the forum set, and repeat as necessary.
Finally, we can post with our Rainbow text as an approved user in the appropriate forums.
To do so, we're going to start a topic as normal.
Once you are at the topic posting screen, look on the right hand side where you should see "Post Options"
Tick the box on where you see "Enable HTML?"
Place this before the text you wish to add Rainbow to:
<span name="Rainbow">
And then place your text.
At the end of your text, add this:
</span>
Things to note:
*The rainbow will only show on skins that you add the script to.
*It does not matter exactly where you place the script, as long as it is there and does not interrupt other code.
*Only usergroups that you allow may use this on allowed forums.
*This will only work in the forums you allow, regardless of user permission sets.
*This will work wherever HTML is enabled, including signatures and about me.