Post by $©Ø®Þ!@Ω™ on Mar 2, 2006 3:22:24 GMT
A friend of mine made this code. It allows a user to put UBBC tags in their personal text. PLACE IN GLOBAL FOOTER.
For a preview, check my profile on DJA3.
<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\]\w+\[\/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>
For a preview, check my profile on DJA3.