MyCode is used to format posts in MyBB. If you know HTML, MyCode will not be a problem. MyCode is enclosed in square brackets: [ ]
There are several types of MyCode:
- Those with an opening tag and a closing tag like the bold tag: [b]text[/b]
- Those with only one tag: [hr]
- Those with attributes within the tags: [font=Comic Sans MS]This will be in Comic Sans MS[/font]
- Those that need an opening tag, a closing tag, and tags in the middle (such as in lists)
- There is Custom MyCode
Contents |
This is a quick list of all of the default MyCode. Following this list, there is a more detailed description of each MyCode.
bold | [b][/b] |
italic | [i][/i] |
underline | [u][/u] |
strikethrough | [s][/s] |
URL | [url]http://url.com[/url] [url=http://url.com]My URL[/url] |
[email][email protected][/email] [[email protected]]My Email[/email] | |
quote | [quote][/quote] [quote=Author][/quote] |
code | [code][/code] [php][/php] |
image | [img]http://mysite.com/mypic.jpg[/img] |
font color | [color=red][/color] |
font size | [size=3][/size] |
font face | [font=tahoma][/font] |
text alignment | [align=center][/align] |
listing | [list][/list] and [*] |
Syntax
[b]TEXT[/b] [i]TEXT[/i] [u]TEXT[/i] [s]TEXT[/i]
Examples
[b]Bold text[/b] [i]Italicized text[/i] [u]Underlined text[/u] [s]Strikethrough text[/s]
Results
Bold text
Italicized text
Underlined text
Strikethrough text
Syntax
[size=SIZE]TEXT[/size]
Examples
[size=xx-small]XX-Small[/size] [size=x-small]X-Small[/size] [size=small]Small[/size] [size=medium]Medium[/size] [size=large]Large[/size] [size=x-large]X-Large[/size] [size=xx-large]XX-Large[/size]
Results
XX-Small
X-Small
Small
Medium
Large
X-Large
XX-Large
Syntax
[font=NAME_OF_FONT]TEXT[/font]
Examples
[font=Tahoma]This is in Tahoma[/font] [font=Courier]This is in Courier[/font]
Results
This is in Tahoma
This is in Courier
Syntax
[color=THE_COLOR]TEXT[/font]
Examples
[color=red]This is red[/color] [color=green]This is green[/color] [color=#0000FF]This is blue, in Hex form[/color]
Results
This is red
This is green
This is blue, in Hex form
Syntax
[align=POSITION]
Examples
[align=left]Left-aligned[/align] [align=center]Center-aligned[/align] [align=right]Right-aligned[/align] [align=justify]Justified[/align]
Results
Left-aligned
Center-aligned
Right-aligned
Justified
(Justified is more noticeable when there are large blocks of text. )
Syntax
[code]CODE HERE[/code]
Examples
[code]<div class="menu">Text Here.. <- Those spaces won't be merged</div>[/code]
[code]<a href="http://domain.com/">Text Here..</a>[/code]
Results
<div class="menu">Text Here.. <- Those spaces won't be merged</div>
<a href="http://domain.com/">Text Here..</a>
Syntax
[php]PHP CODE HERE[/php]
Examples
[php]<?php echo "Hi!"; ?>[/php]
[php]<?php // Comment $mybb->user['var'] = "Hi"; ?>[/php]
Results
<?php echo "Hi!"; ?>
<?php
// Comment
$mybb->user['var'] = "Hi";
?>
Syntax
[img]http://example.com/image.gif[/img]
[img=WIDTHxHEIGHT]http://example.com/image.gif[/img]
Examples
[img]http://wiki.mybb.com/images/e/ea/Logo.gif[/img]
[img=100x33]http://wiki.mybb.com/images/e/ea/Logo.gif[/img]
Syntax
[attachment=ATTACHMENT_ID]
Examples
[attachment=11776]
Results
[icon] mybb_1403_patches.txt (Size: 2.16 KB / Downloads: 1125)
NOTE: This shortcut only works for attachments that are attached to the post you are writing. It does not allow you to include attachments from other posts.
Syntax
[url]http://example.com[/url]
[url=http://example.com]Title[/url]
Examples
[url]https://community.mybb.com[/url]
[url=https://community.mybb.com]Support Communtiy[/url]
Results
https://community.mybb.com
Support Communtiy
Syntax
[email][email protected][/email]
[[email protected]?subject=work]Link text[/email]
Examples
[email][email protected][/email]
[[email protected]]E-mail Me![/email]
[[email protected]?subject=spam]E-mail with subject 'spam'[/email]
Results
[email protected]
E-mail Me!
E-mail with subject 'spam'
Syntax
[list] [*]List Item #1 [*]List Item #2 [*]List Item #3 ... [/list]
Examples
To Do: [list] [*]Fix the boiler [*]Buy: [list] [*]Eggs [*]Milk [/list] [*]Call mother [/list]
(The indentation of the inner list is only for readability, it is not required)
Results
To Do:
- Fix the boiler
- Buy:
- Eggs
- Milk
- Call mother
Syntax
[list=1] [*]List Item #1 [*]List Item #2 [*]List Item #3 ... [/list]
Examples
To Do: [list=1] [*]Fix the boiler [*]Buy eggs & milk [*]Call mother [/list]
Results
To Do:
- Fix the boiler
- Buy eggs & milk
- Call mother
Syntax
[list=a] [*]List Item #1 [*]List Item #2 [*]List Item #3 ... [/list]
Examples
To Do: [list=a] [*]Fix the boiler [*]Buy eggs & milk [*]Call mother [/list]
Results
To Do:
- a. Fix the boiler
- b. Buy eggs & milk
- c. Call mother
Archive Mode - Attachments - Multiquote - MyCode - Polls - Private Messages - Reputation - RSS Syndication - Search Engine Friendly URLs - Smilies - Subscriptions - User Groups - User Referrals - Warning System |