MyCode
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 |
[edit] MyCode Quick Reference
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]myemail@mydomain.com[/email] [email=myemail@mydomain.com]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 [*] |
[edit] Text Formatting
[edit] Bold, Italics, Underline, Strikethrough
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
[edit] Font Size
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
[edit] Font Face
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
[edit] Font Color
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
[edit] Text Alignment
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. )
[edit] Preformatted Text
[edit] General Code
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>
[edit] PHP Code
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";
?>
[edit] Images and Attachments
[edit] Images
Syntax
[img]http://example.com/image.gif[/img]
[img=WIDTHxHEIGHT]http://example.com/image.gif[/img]
Examples
[img]http://wiki.mybboard.net/images/e/ea/Logo.gif[/img]
[img=100x33]http://wiki.mybboard.net/images/e/ea/Logo.gif[/img]
[edit] Attachments
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.
[edit] Links
[edit] URL
Syntax
[url]http://example.com[/url]
[url=http://example.com]Title[/url]
Examples
[url]http://community.mybboard.net[/url]
[url=http://community.mybboard.net]Support Communtiy[/url]
Results
http://community.mybboard.net
Support Communtiy
[edit] Email
Syntax
[email]example@example.com[/email]
[email=example@example.com?subject=work]Link text[/email]
Examples
[email]example@example.com[/email]
[email=example@example.com]E-mail Me![/email]
[email=example@example.com?subject=spam]E-mail with subject 'spam'[/email]
Results
example@example.com
E-mail Me!
E-mail with subject 'spam'
[edit] Lists
[edit] Unordered Lists
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
[edit] Ordered Lists
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
[edit] Alphabetical Lists
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 |
