Hi all,
Take my last code adaptation for the shoutbox
So take the last bbcode : rainbow, glow and neon
In backend/fonction.php put the next code in the correct section :
//[rainbow]Text[/rainbow]
$s = preg_replace("/\[rainbow\]((\s|.)+?)\[\/rainbow\]/", "<SPAN class=rainbow>\\1</SPAN>", $s);
//[glow]Text[/glow]
$s = preg_replace("/\[glow\]((\s|.)+?)\[\/glow\]/", "<SPAN id=glowtext>\\1</SPAN>", $s);
//[neon]Text[/neon]
$s = preg_replace("/\[neon\]((\s|.)+?)\[\/neon\]/", "<h2 id=\"neo1\" style=\"color:gray;\">\\1</h2><script type=\"text/javascript\">new neoII('neo1', 'yellow', '#ffffa8', 100, 3, 1, 0);</script>", $s);
Now you must put the javascript code in the correct section in shoutbox.php:
<STYLE>
.rainbow{ behavior:url(js/rainbow.htc) }
</STYLE>
<script type="text/javascript">
//OO Neon Lights Text II from Neon Lights Text II by G.P.F. (gpf@beta-cc.de)
//visit
http://www.beta-cc.de - This notice must remain for legal use
//Visit
http://www.dynamicdrive.com for TOS
//Modified in
http://www.dynamicdrive.com/forums/ by jscheuer1 for multiple use
///////////// No Need To Edit Here - See Below, in the Body /////////////
function neoII(id, nc, nc2, fs, fl, fl2, fp){
if(!document.createElement||(!document.getElementById&&!document.all)) return;
this.id=id;
this.el=document.getElementById? document.getElementById(id) : document.all[id];
this.message=this.el.firstChild.nodeValue;
this.el.firstChild.nodeValue='';
this.neonbasecolor=this.el.style.color;
this.neontextcolor=nc;
this.neontextcolor2=nc2;
this.flashspeed=fs;
this.flashingletters=fl;
this.flashingletters2=fl2;
this.flashpause=fp;
this.n=0;
for (var s, m=0; m < this.message.length; m++){
s=document.createElement('span');
s.id=id+m;
s.appendChild(document.createTextNode(this.message.charAt(m)));
this.el.appendChild(s);
}
this.beginneon();
}
neoII.prototype.crossref=function(number){
var crossobj=document.all? document.all[this.id+number] : document.getElementById(this.id+number);
return crossobj;
}
neoII.prototype.neon=function(){
//Change all letters to base color
if (this.n==0){
for (var m=0;m<this.message.length;m++)
this.crossref(m).style.color=this.neonbasecolor;
}
//cycle through and change individual letters to neon color
this.crossref(this.n).style.color=this.neontextcolor;
if (this.n>this.flashingletters-1)
this.crossref(this.n-this.flashingletters).style.color=this.neontextcolor2;
if (this.n>(this.flashingletters+this.flashingletters2)-1)
this.crossref(this.n-this.flashingletters-this.flashingletters2).style.color=this.neonbasecolor;
if (this.n<this.message.length-1)
this.n++;
else{
this.n=0;
clearInterval(this.flashing);
var c=this;
for (var m=0;m<this.message.length;m++)
this.crossref(m).style.color=this.neonbasecolor;
setTimeout(function(){c.beginneon();},this.flashpause);
return;
}
}
neoII.prototype.beginneon=function(){
var c=this;
this.flashing=setInterval(function(){c.neon();}, this.flashspeed);
}
</script>
<style>
<!--
#glowtext{
filter:glow(color=FFFF00,strength=3);
width:100%;
}
-->
</style>
<script language="JavaScript1.2">
/*
Glowing Text Script-
[url="
http://devscorner.xyz/applications/core/interface/file/attachment.php?id=2734"]rainbow.rar[/url]