2009-03-02, 07:12 PM
Ok, just finished this up. I copied it over from my original post. I will be creating more exclusive tutorials on my forum during this week.. I'll add the more frequent requests here on MyBB.
Let's begin...
MyCodes are pretty simple. All they do is replace an HTML tag.
For the sake of the tutorial, let's create a custom YouTube MyCode, since it seems to be of a lot of interest. It will also give you an understanding on how to create your own MyCodes for other video sites and creating code from custom HTML.
This will be very easy for you to understand and it will be step by step.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Go ahead now and paste the embed code inside of the box shown below.
Step 7
Step 8
Step 9
Step 10
Step 11
Step 12
Things to remember:
When testing, be aware that things don't display 100% correctly in all cases. If you're confident your code is correct, and you're test result is funky, try saving the code, and testing the function via a new post in your forum.
If you want to create a new MyCode it's pretty simple. Do the same routine as you did here. For example, if you want to create a Google video MyCode it will be a similar experience. Note that it doesn't work for all videos. You'll understand why once you've tried it on some things.
If you wanted to create a code that will make red text, for example, it's pretty easy. Your replacement can be something like <font color="#FF0000">$1</font> and you'd then just use \[redtext\](.*?)\[/redtext\] for the regular expression.. that way if a user entered [redtext]This is red text[/redtext] it'd come out as This is red text. The sky's the limit. Have fun.
Let's begin...
MyCodes are pretty simple. All they do is replace an HTML tag.
For the sake of the tutorial, let's create a custom YouTube MyCode, since it seems to be of a lot of interest. It will also give you an understanding on how to create your own MyCodes for other video sites and creating code from custom HTML.
This will be very easy for you to understand and it will be step by step.
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Go ahead now and paste the embed code inside of the box shown below.
Step 7
Step 8
Step 9
Step 10
Step 11
Step 12
Things to remember:
When testing, be aware that things don't display 100% correctly in all cases. If you're confident your code is correct, and you're test result is funky, try saving the code, and testing the function via a new post in your forum.
If you want to create a new MyCode it's pretty simple. Do the same routine as you did here. For example, if you want to create a Google video MyCode it will be a similar experience. Note that it doesn't work for all videos. You'll understand why once you've tried it on some things.
If you wanted to create a code that will make red text, for example, it's pretty easy. Your replacement can be something like <font color="#FF0000">$1</font> and you'd then just use \[redtext\](.*?)\[/redtext\] for the regular expression.. that way if a user entered [redtext]This is red text[/redtext] it'd come out as This is red text. The sky's the limit. Have fun.