MyBB Community Forums

Full Version: Custome MyCode Not Working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i have some custome MyCodes i got but there not working

like this 1

\[rainbow\](.*?)\[/rainbow\]

<script type="text/javascript">var rainbowMessage = "Rainbow Sample Text";var rainbowSpeed = 50;var rainbowLetters = 2;var rainbowPause = 0;var rainbowPointer = 0;function getRandomHex(){colors = "0123456789abcdef";color="";for(c=0;c<6;c++)color = color + colors.charAt(Math.round(Math.random()*14));return "#"+color;}function Rainbow(rainbowMessage1, rainbowSpeed1){rainbowMessage = rainbowMessage1 ? rainbowMessage1 : rainbowMessage;rainbowSpeed = rainbowSpeed1 ? rainbowSpeed1 : rainbowSpeed;var rmb = document.getElementById("rainbow_container");rmb.innerHTML += '<font color="'+getRandomHex()+'">';for(i = 0; i < rainbowMessage.length; i++)rmb.innerHTML += '<span id="rainbow' + i + '" style="color:' + getRandomHex() + ';">' + rainbowMessage.charAt(i) + '</span>';rmb.innerHTML += '</font>';}function doRainbow(){document.getElementById("rainbow" + rainbowPointer).style.color = getRandomHex();if (rainbowPointer < rainbowMessage.length - 1){rainbowPointer++;}else{rainbowPointer = 0;clearInterval(flash);setTimeout("beginRainbow()", rainbowPause);}}function beginRainbow(){flash = setInterval("doRainbow()", rainbowSpeed);}</script><body onload="javascript: Rainbow('$1'); beginRainbow();"><div id="rainbow_container" style="font-size:1em;"></div></body>




i have about 5 mycodes and there not working it only shows up [rainbow]hrhwsryh[/rainbow] or ect..