MyBB Community Forums

Full Version: MyCode confusion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I do not understand MyCode at all. I have read through the wiki and still I don't understand it. I have been asked if it would be possible to add a table to posts. I know it can be done with my code but I don't understand how and how to use the code in a post.

I have looked at this port here but i am still confused.

Do I need to add all those
\[table\]
\[tr\]
\[td\] and so on
seperatly? So a MyCode for each or can I place all of them in a single MyCode?
How would I go about using this MyCode business in a post?

Obviously i need some helpRolleyes

Regards,

Martin
Just download this MyCode pack:
http://mods.mybboard.net/view/mycode-pack

Wink
Thank you for pointing this plugin out to me. Although i still don't really understand how to create a table on my own in the admin > MyCode area (I would still appreciate it if someone could explain it to me) I can now simply use this plugin to create the table needed:-).

However!

Where can I see all the codes I can use? Or can I just all html tags that exsist?

Regards,

Martin
Creating them is quite simple, you need the HTML that it'll be producing and the text that the user will type.

For example... Regular Expression:

[b][i][u](.*?)[/u][/i][/b]

Replacement:

<strong><em><u>$1</u></em></strong>

or... Regular Expression:

[url=(.*?)](.*?)[/url]

Replacement:

<a href="$1">$2</a>

That's kinda like the default [url] MyCode. The number after the $ refers to the position of the (.*?) (or another similar regex) in the Regular Expression.