BB‐Codes - My-Little-Forum/mylittleforum GitHub Wiki

BB-Codes in My Little Forum

Supplied BB codes

My Little Forum provides a number of BB-Codes. One has to activate the conversion of BB-Code in the forum settings with setting bbcode to 1. This enables a set of basic BB-Codes for formatting text and insert links in the entries with an additional linktext. Some further BB-Codes are hidden behind additional settings.

For some of the BB-Codes the forum software provides a UI to insert them in the posting text. The UI provides the necessary buttons and displays them beside the text area to insert the posting text. There is currently no similar UI for the signature form.

BB-Codes, enabled with bbcode = 1

  • [b][/b] for bold text
  • [i][/i] for italic text
  • [u][/u] for underlined text
  • [link][/link] or [url][/url] for links,
    use it as [link]URL[/link] or [link=URL]linktext[/link] (or with [url] instead of [link])
  • [ins][/ins] for marking subsequently inserted text, introduced with PR #699
  • [del][/del] for marking subsequently deleted text, introduced with PR #699
  • [s][/s] for marking text with a strike through line (similar to [del]), introduced with PR #699

BB-Codes, enabled with bbcode_code = 1

  • [code][/code] for codeblocks,
    it's possible to add a coding language to the opening tag, in example [code=html],
    this feature has to be activated separately with syntax_highlighter set to 1
  • [inlinecode][/inlinecode] for code snippets like $variable = value; inside a text block

BB-Codes, enabled with bbcode_color = 1

BB-Codes, enabled with bbcode_img = 1

  • [img]URL[/img] for displaying an image
  • [img=left]URL[/img] for displaying an image, text content floating around on the right side of the image
  • [img=right]URL[/img] for displaying an image, text content floating around on the left side of the image
  • [img=thumbnail]URL[/img] for displaying thumbnail of an image
  • [img=thumbnail-left]URL[/img] for displaying thumbnail of an image, text content floating around on the right side of the image
  • [img=thumbnail-right]URL[/img] for displaying thumbnail of an image, text content floating around on the left side of the image

BB-Codes, enabled with bbcode_size = 1

  • [size=small][/size] for text with a smaller font size than the default text
  • [size=large][/size] for text with a larger font size than the default text

BB-Codes, enabled with bbcode_tex = 1

  • [tex]formula[/tex] for mathematic and scientific formulas,
    it is necessary to provide a URL to a MathJax library in the setting bbcode_latex_uri,
    the linked MathJax instance can be hosted locally under the domain of the forum as well be taken from a CDN

BB-Codes, enabled with bbcode_media = 1

  • [media type=audio]URL[/media] for conversion of a given URL of an audio file to the HTML element <audio>,
    supported audio file formats: MP3, OGG, WAV
  • [media type=video]URL[/media] for conversion of a given URL of an video file to the HTML element <video>,
    supported video file format: MP4
⚠️ **GitHub.com Fallback** ⚠️