2010-07-26, 03:03 PM
How to create your own MyCode
To create your own MyCode you will need basic knowledge in HTML
Let's start.
Go to create a new MyCode in the Admin CP.
Now you will see six fields of options.
Title
Here you insert the name of your new MyCode
Short Description
Information about your MyCode
Regular Expression
This is where you decide how your MyCode should be used
Replacement
And this is what happens when you type the Regular Expression
Enabled?
On / Off Switch
Parse Order
In what order your MyCode will be displayed
First you need to think of the Regular Expression.
If you want to use a single tag without have to end it like [help] you type
If you want to use a double tag, with ending it like [help]Content[/help] you type
The (.*?) is the definition of what the Replacement will find. The first (.*?) is $1, and the second (.*?) is $2 and so on.
Now for your Replacement.
Let's say you want users to see this when people type [help]Content[/help]
This user has requested assistance : Content.
Then you will have to type this into the regular expression.
See that I put the $1 there? It defines the first (.*?) used in the Regular Expression.
This is just something really simple that you could do.
This tutorial was written by Clone
Thanks
To create your own MyCode you will need basic knowledge in HTML
Let's start.
Go to create a new MyCode in the Admin CP.
Now you will see six fields of options.
Title
Here you insert the name of your new MyCode
Short Description
Information about your MyCode
Regular Expression
This is where you decide how your MyCode should be used
Replacement
And this is what happens when you type the Regular Expression
Enabled?
On / Off Switch
Parse Order
In what order your MyCode will be displayed
First you need to think of the Regular Expression.
If you want to use a single tag without have to end it like [help] you type
\[help\]
If you want to use a double tag, with ending it like [help]Content[/help] you type
\[help\](.*?)\[/help\]
The (.*?) is the definition of what the Replacement will find. The first (.*?) is $1, and the second (.*?) is $2 and so on.
Now for your Replacement.
Let's say you want users to see this when people type [help]Content[/help]
This user has requested assistance : Content.
Then you will have to type this into the regular expression.
<bold>This user has requested assistance</bold> : <font color="red">$1</font>
See that I put the $1 there? It defines the first (.*?) used in the Regular Expression.
This is just something really simple that you could do.
This tutorial was written by Clone
Thanks