Chapter 2. FUDcode

Table of Contents

Text Styling Tools
Bold
Italics
Underline
Subscript
Superscript
Font Color
Font Size
Font Face
Text Alignment
Lists
Ordered Lists
Unordered Lists
Links
URLs
E-mails
Images
Text Blocks
Code
Quote
Spoiler Tag

In most cases allowing users to enter HTML inside their message is impractical for security and stylistic reasons, FUDforum 2.3 offers a large set of it's own formatting tags that will internally be converted to HTML. Thus preventing users from compromising security by inserting hostile JavaScript in to their messages and intentionally or unintentionally breaking the layout of the forum.

Majority of the FUDcode tags can be easily accessed via a toolbar at the top of the post form, which allows the user to use the tag without necessarily knowing how the tag itself works.

Note

users who use Internet Explorer 5.0+ browsers have an additional feature, if they select the text and then click on the toolbar option for a particular test styling element, then that text styling will be applied to the selected text. As JavaScript support in other browsers improves this feature may be available in other browsers as well.

This section will discuss and demonstrate the various tags supported by FUDcode.

Text Styling Tools

The following tags allow the user to transform their text in a certain fashion.

Bold

Text between the [b] and [/b] tags will be made bold using the HTML's <b> tag.

ex. [b]bold text[/b] will be converted to <b>bold text</b>
The result will look something like this: bold text

Italics

Text between the [i] and [/i] tags will be italicized using the HTML's <i> tag.

ex. [i]italic text[/b] will be converted to <i>italic text</i>

Underline

Text between the [u] and [/u] tags will be underlined using the HTML's <u> tag.

ex. [u]underlined text[/u] will be converted to <u>underlined text</u>

Subscript

Text between the [sub] and [/sub] tags will be subscripted using the HTML's <sub> tag.

ex. [u]subscript text[/u] will be converted to <sub>subscript text</sub>
The result will look something like this: subscript text

Superscript

Text between the [sup] and [/sup] tags will be superscripted using the HTML's <sup> tag.

ex. [sup]superscript text[/sup] will be converted to <sup>superscript text</sup>
The result will look something like this: superscript text

Font Color

The user may specify the color of the text by using the [color] tag, which can accept a hex value representing the color or a color name parameter.

ex. [color=red]red text[/color] will result in <font color="red">red text</font> HTML.

Font Size

The user may specify the font size of the text by using the [size] tag, which can accept a numeric font size ranging from 1 (smallest) to 7 (greatest).

ex. [size=5]big text[/size] will result in <font size="5">big text</font> HTML.

Font Face

The user may specify a font that will be used to render their text by using the [font] tag, which can accept a font name, or a font group as a parameter.

ex. [font=arial]arial font[/font] will result in <font face="arial">arial text</font> HTML.

Text Alignment

The user may also specify the alignment of their text by using the [align] tag with a left,right or center parameter.

ex. [align=center]centered text[/align] will result in <div align="center">centered text</div>

The user may use those tags in combination with each other as the example below demonstrates.

Example 2.1. Using Multiple Text Styling Tags


[b]Bold
	[i]Bold Italics
		[u]Bold, Italics and Underlined[/u]
		[color=red]Red, Bold and Italics
			[sub]Red, Bold, Italics	and Subscript[/sub]
		[/color]
	[/i]
[/b]

will be converted to:


<b>
	<i>Bold Italics
		<u>Bold, Italics and Underlined</u>
		<font color="red">Red, Bold and Italics
			<sub>Red, Bold, Italics and Subscript</sub>
		</font>
	</i>
</b>