BBCode
Encyclopedia
BBCode or Bulletin Board Code is a lightweight markup language
used to format posts in many message boards. The available tags are usually indicated by square brackets
([ ] ) surrounding a keyword, and they are parsed
by the message board system before being translated into a markup language
that web browser
s understand—usually HTML
or XHTML
.
BBCode was first introduced in 1998 by the messageboard software Ultimate Bulletin Board
(UBB). This is why BBCode is sometimes referred to as UBBCode.
leading to XSS
attacks. Some implementations of BBCode have suffered problems related to the way they translate the BBCode into HTML, which could negate the security that was intended to be given by BBCode. An alternative is a properly written HTML filter (many of which are freely available).
Although the basic tags of BBCode are similar in most internet forum
software, there is currently no standards document for BBCode and there are consequently many incompatible variants. Some variants are case-sensitive
while others are not. Some variants have tags which highlight the formatting of HTML
, ASP
, PHP
, SQL
and other markup language
s and programming language
s.
Some forums may allow use the tag [background]. It is used similarly to the [img] tag and should be used with an image filename to display as the post background.
Many message boards include a FAQ
with information on how to use their own variants of BBCode. In addition, some bulletin board systems allow administrators to define their own custom BBCodes. This is usually done by asking them to specify the BBCode markup (utilizing variables/wildcards to indicate the user-customizable parts of the code) and then indicating the XHTML replacement which will be substituted for the BBCode.
Web 2.0
progression of BBCode sees the uncommon occurrence of new tags such as[youtube], [facebook], and [skype] tags.
Lightweight markup language
A lightweight markup language is a markup language with a simple syntax, designed to be easy for a human to enter with a simple text editor, and easy to read in its raw form....
used to format posts in many message boards. The available tags are usually indicated by square brackets
Bracket
Brackets are tall punctuation marks used in matched pairs within text, to set apart or interject other text. In the United States, "bracket" usually refers specifically to the "square" or "box" type.-List of types:...
(
Parsing
In computer science and linguistics, parsing, or, more formally, syntactic analysis, is the process of analyzing a text, made of a sequence of tokens , to determine its grammatical structure with respect to a given formal grammar...
by the message board system before being translated into a markup language
Markup language
A markup language is a modern system for annotating a text in a way that is syntactically distinguishable from that text. The idea and terminology evolved from the "marking up" of manuscripts, i.e. the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts...
that web browser
Web browser
A web browser is a software application for retrieving, presenting, and traversing information resources on the World Wide Web. An information resource is identified by a Uniform Resource Identifier and may be a web page, image, video, or other piece of content...
s understand—usually HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....
or XHTML
XHTML
XHTML is a family of XML markup languages that mirror or extend versions of the widely-used Hypertext Markup Language , the language in which web pages are written....
.
BBCode was first introduced in 1998 by the messageboard software Ultimate Bulletin Board
UBB.classic
UBB.classic was an Internet forum software package originally written by Ted O'Neill of Social Strata, Inc. in 1996. It was written in Perl and used a flat file database...
(UBB). This is why BBCode is sometimes referred to as UBBCode.
Purpose
BBCode was devised to provide a safer, easier and more limited way of allowing users to format their messages. Previously, many message boards allowed the users to include HTML formatting, a side effect of which was that malformed HTML could disrupt the page's layout, or HTML could be used to run JavaScriptJavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....
leading to XSS
Cross-site scripting
Cross-site scripting is a type of computer security vulnerability typically found in Web applications that enables attackers to inject client-side script into Web pages viewed by other users. A cross-site scripting vulnerability may be used by attackers to bypass access controls such as the same...
attacks. Some implementations of BBCode have suffered problems related to the way they translate the BBCode into HTML, which could negate the security that was intended to be given by BBCode. An alternative is a properly written HTML filter (many of which are freely available).
Although the basic tags of BBCode are similar in most internet forum
Internet forum
An Internet forum, or message board, is an online discussion site where people can hold conversations in the form of posted messages. They differ from chat rooms in that messages are at least temporarily archived...
software, there is currently no standards document for BBCode and there are consequently many incompatible variants. Some variants are case-sensitive
Case sensitivity
Text sometimes exhibits case sensitivity; that is, words can differ in meaning based on differing use of uppercase and lowercase letters. Words with capital letters do not always have the same meaning when written with lowercase letters....
while others are not. Some variants have tags which highlight the formatting of HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....
, ASP
Active Server Pages
Active Server Pages , also known as Classic ASP or ASP Classic, was Microsoft's first server-side script engine for dynamically-generated Web pages. Initially released as an add-on to Internet Information Services via the Windows NT 4.0 Option Pack Active Server Pages (ASP), also known as Classic...
, PHP
PHP
PHP is a general-purpose server-side scripting language originally designed for web development to produce dynamic web pages. For this purpose, PHP code is embedded into the HTML source document and interpreted by a web server with a PHP processor module, which generates the web page document...
, SQL
SQL
SQL is a programming language designed for managing data in relational database management systems ....
and other markup language
Markup language
A markup language is a modern system for annotating a text in a way that is syntactically distinguishable from that text. The idea and terminology evolved from the "marking up" of manuscripts, i.e. the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts...
s and programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....
s.
BBCode tags
The following are the most common BBCode tags available to most modern message boards, and are displayed here with their HTML equivalents. However, the effect of these tags can be changed substantially, and the effect may not be identical on all sites using BBCode.BBCode | example HTML | Effect | ||
|
, or
|
bolded text | ||
|
, or
|
italicized text | ||
|
, or
|
underlined text | ||
|
, or
|
|
||
|
|
http://example.org | ||
|
|
Example | ||
|
|
|||
|
(usually implemented in more advanced ways) |
To quote:
|
||
|
|
monospaced text |
||
(The unit of measurement varies with each BBCode variant and could represent pixels, points, or relative HTML sizes.) |
|
Large Text | ||
or
or
(Both HTML color names and hexadecimal color values are generally supported, although on some boards, you must omit the # from selecting a hexadecimal color.) |
|
Red Text | ||
:)
this would be another way to use the [img]url_img[/img] and must be pre-configured for the forum administrator(And other emoticon Emoticon An emoticon is a facial expression pictorially represented by punctuation and letters, usually to express a writer’s mood. Emoticons are often used to alert a responder to the tenor or temper of a statement, and can change and improve interpretation of plain text. The word is a portmanteau word... s, depending on the variant) |
|
(Specific image and size vary) | ||
|
|
|
||
|
|
|
Some forums may allow use the tag [background]. It is used similarly to the [img] tag and should be used with an image filename to display as the post background.
Many message boards include a FAQ
FAQ
Frequently asked questions are listed questions and answers, all supposed to be commonly asked in some context, and pertaining to a particular topic. "FAQ" is usually pronounced as an initialism rather than an acronym, but an acronym form does exist. Since the acronym FAQ originated in textual...
with information on how to use their own variants of BBCode. In addition, some bulletin board systems allow administrators to define their own custom BBCodes. This is usually done by asking them to specify the BBCode markup (utilizing variables/wildcards to indicate the user-customizable parts of the code) and then indicating the XHTML replacement which will be substituted for the BBCode.
Web 2.0
Web 2.0
The term Web 2.0 is associated with web applications that facilitate participatory information sharing, interoperability, user-centered design, and collaboration on the World Wide Web...
progression of BBCode sees the uncommon occurrence of new tags such as