Post by Matt on Apr 20, 2006 16:42:31 GMT -5
This code will allow you to use Bold, Italic, Underline, Strikethrough, Links, Marquee, Font Size, Sub, Sup, Images, HRs and Line Breaks. Version 2 will include more, but you'll have to wait for that.
Goes in your Global Footer
Created by: _pb.Serpent
Goes in your Global Footer
Created by: _pb.Serpent
<script type="text/javascript">
<!--
/* UBBC in Personal Text by _pb.Serpent (http://serpentgraphics.proboards55.com)
Big thanks to Crazy_J
May be reposted or edited as you wish as long as this header stays intact*/
var pttd = document.getElementsByTagName("td");
for(i=0; i<pttd.length; i++)
{
if(pttd[i].width == '20%' && pttd[i].innerHTML.match(/Posts:/i))
{
pttd[i].innerHTML.match(/\[b\](.+?)\[\/b\]/)
pttd[i].innerHTML =
pttd[i].innerHTML.replace(/\[b\]\.+?\[\/b\]/,'<b>'+RegExp.$1+'</b>');
pttd[i].innerHTML.match(/\[i\](.+?)\[\/i\]/)
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[i\](.+?)\[\/i\]/,'<i>'+RegExp.$1+'</i>');
pttd[i].innerHTML.match(/\[\u\](.+?)\[\/u\]/)
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[\u\](.+?)\[\/u\]/,'<u>'+RegExp.$1+'</u>');
pttd[i].innerHTML.match(/\[url=(.+?)\](.+?)\[\/url\]/)
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[url=(.+?)\](.+?)\[\/url\]/,'<a href="'+RegExp.$1+'">'+RegExp.$2+'</a>');
pttd[i].innerHTML.match(/\[s\](.+?)\[\/s\]/)
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[s\](.+?)\[\/s\]/,'<s>'+RegExp.$1+'</s>');
pttd[i].innerHTML.match(/\[move\](.+?)\[\/move\]/)
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[move\](.+?)\[\/move\]/,'<marquee>'+RegExp.$1+'</marquee>');
pttd[i].innerHTML.match(/\[size=(.+?)\](.+?)\[\/size\]/)
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[size=(.+?)\](.+?)\[\/size\]/,'<font size="'+RegExp.$1+'">'+RegExp.$2+'</font>');
pttd[i].innerHTML.match(/\[sup\](.+?)\[\/sup\]/)
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[sup\](.+?)\[\/sup\]/,'<sup>'+RegExp.$1+'</sup>');
pttd[i].innerHTML.match(/\[sub\](.+?)\[\/sub\]/)
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[sub\](.+?)\[\/sub\]/,'<sub>'+RegExp.$1+'</sub>');
pttd[i].innerHTML.match(/\[img\](.+?)\[\/img\]/)
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[img\](.+?)\[\/img\]/,'<img src="'+RegExp.$1+'">');
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[hr\]/gi,'<hr>');
pttd[i].innerHTML = pttd[i].innerHTML.replace(/\[br\]/gi,'<br/>');
}}
//-->
</script>