BBcode

From Mindat

BBcode is an alternate method to format your messages. You can put in links, use bold or italic text, create subscripts or superscripts (helpful for chemical formulas). It is safer than using html for formatting since forgetting a closing tag will not mess up the formatting of the rest of the web page (just leave you with a tag sitting in your message).

The format for adding a tag is to type in the tag name between square brackets where you want the formatting to appear and and closing tag (same as opening with a slash before the tag. [tag] formatted text [/tag].

You can have more than one effect applied to text, but the commands should be nested.

OK - [b][i]formatted text[/i][/b]
WRONG - [b][i]formatted text[/b][/i]
Table of contents

Text Formatting Tags

Letters

  • Bold - [b]formatted text[/b]
  • Italic - [i]formatted text[/i]
  • Underline - [u]formatted text[/u]
  • Strikethrough - [s]formatted text[/s]
  • Font Size [size=x]formatted text[/size] - replace x by an integer between 1 to 29 (anything below about 8 might not be visible. The normal size range is from 9(small) to 24 (huge). ie [size=9]formatted text[/size] will output small text.
  • Font color - there are two ways of specifying the color - either through a color name or a six digit hexadecimal code.
 [color=red]formatted text[/color]
 or
 [color=#FF0000]formatted text[/color]


Block text

  • Center - [center]formatted text[/center]
  • Code - This allows you to output data with a courier typeface and a fixed width (ie tables). [code]formatted text[/code]
  • Horizontal rule - draw a line across a page (no closing tag for this action) [hr]


Positioning on line

  • Superscript - Formula for wustite (showing valence state for iron) Fe[sup]2+[/sup]O
  • Subscript - Formula for Magnetite Fe[sub]3[/sub]O[sub]4[/sub]


Links

To cut down on potential spamming of the message board, only registered users will be able to post links to any site. Guest posters can still provide links to a page on mindat.org.

  • [url=][/url] The link will be put after the = sign and the text between the tags will be displayed as a link. ie [url=http://www.mindat.org/]Mindat home page[/url]
  • [url]link[/url] will display a link with the url shown ie [url]http://www.mindat.org/[/url]
  • email links - [email]no.one@mindat.org[/email] - this is something that you probably don't want to do if you are trying to avoid spam.


Photos

  • You can select to embed the attachment in the main body of the text. This is done via a button on the attach file line after the file has been uploaded.
Button for attachment in body of message
Enlarge
Button for attachment in body of message
Generated BBCode for attachment
Enlarge
Generated BBCode for attachment

Mindat tags

  • You can embed a photo from the mindat database in your message with the pic tag (Available from the mindat tourmaline button). [pic id=XXXX width=800 float=left] Caption [/pic] You need to replace the XXXX with the actual number of the photograph. The photo number can be found by looking at the address of the photo (ie /photo-185654.html is number 185654). The width parameter is the photo width in pixels. The maximum width that is shown is 855. You can scale the photo to whatever width you desire to make things look nice. This is not required and if not specified, it will use the width of the photo up to the maximum allowed width. Options for float are left or right. This will position the photo to the left or right side of the text. If it is not given, positioning will default to the center of the text. If your test that follows the photograph is displayed to the side of the photograph and you want it below the photograph, you need to add a blank line between the end of the pic tag and the beginning of the text (ie hit the enter key once).
Link to place mindat photo in body of message
Enlarge
Link to place mindat photo in body of message