Welcome Guest [Log In] [Register]
Viewing Single Post From: Add Bbc
Agent Moose
Member Avatar
Member
[ * ]
Below the Board:
Code:
 
<script>
function addBBC(bb,c,ht,ml) {
$("a,div.description,li span,tr th small,tr th").each(function() {
//Created by Agent Moose (z1.zetaboards.com/ZetaCode/)
if(this.innerHTML.match(/\[color=.*\]/i) || this.innerHTML.match(/\[\/color\]/i) || this.innerHTML.match(bb) || this.innerHTML.match(c)) {
this.innerHTML = this.innerHTML.replace(/\[color=(.+?)\]/i,"<font color='$1'>");
this.innerHTML = this.innerHTML.replace(/\[\/color\]/i,"</font>");
this.innerHTML = this.innerHTML.replace(bb,ht);
this.innerHTML = this.innerHTML.replace(c,ml);
};});}
addBBC("START BBC","END BBC","START HTML","END HTML");
</script>

This is just like the the Description and Topic Color code, but you can add your own BBC. The color is automaticly added. You can add bold, italics, strike through and more!

Here is an example:
Code:
 
addBBC("[s]","[/s]","<s>","</s>");

All you will have to do is add [ s ] to the begening of the description of topic name(with no spaces), and [ / s ] to the end of the topic name or description(with no spaces), for it to be strike through!

To add more lines, add more of these:
Code:
 
addBBC("START BBC","END BBC","START HTML","END HTML");


Enjoy :)

Preview: Click Here
Edited by Agent Moose, Dec 24 2007, 01:06 PM.
Offline Profile Quote Post
Add Bbc · User Created Codes