Understanding through Discussion

Search Threads

Site Navigation
Discussion
The Forums
 
 
What are UBB Codes?

UBB codes are a variation on the HTML tags you may already be familiar with. They allow you to add functionality or style to your message that would normally require HTML. You can use UBB codes even if HTML is not enabled for the forum you are using. You may want to use UBB codes as opposed to HTML, even if HTML is enabled for your forum, because there is less coding required and the preview panel includes syntax checking. The [url] code can also be used as shown in the following example (UBB codes are in red).

Current UBB codes:

URL Hyperlinking
There are four ways to include a link in your message:

  • The simplest way to include a link is to simply type the URL. Called autolink mode, it works with URLs that begin with "http://", "https://" and "ftp://":
    http://www.evcforum.net
    It would appear like this in your message:
    http://www.evcforum.net
  • If the URL begins with "http://www" then you don't even need the "http://" portion:

    www.evcforum.net
    It would appear like this in your message:
    www.evcforum.net
  • You can instead give your link a name using the [url] code. For example, if you wanted the URL "http://www.evcforum.net" to display as "EvC Forum" then just use the following format which places the desired name after the "=" sign inside the [url] code:
    [URL=http://www.evcforum.net]EvC Forum[/url]
    It would appear like this in your message:
    EvC Forum
  • If you do not include a name by using the "=" sign then the displayed link name will be the same as the URL:
    [url]www.evcforum.net[/url]
    It would appear like this in your message:
    www.evcforum.net
When clicked on, links created in the above ways will be opened in a new window. Note that you should NOT use quotation marks inside the URL tag.
Bold and Italics
You can make italicized text or make text bold by encasing the applicable sections of your text with either the [b] [/b] or [i] [/i] tags.

Hello, [b]James[/b]
Hello, [i]Mary[/i]
Face, Color and Size
You can make text in any font, color or size by using the [face], [color] and [size] tags.

[face=monotype corsiva][color=green][size=4]This text should display using the Monotype Corsiva font with a size of 4 and green in color.[/size][/color][/face]
Text Background Color
You can change the background color of the text to any color you like using the [bgcolor] tag.

[bgcolor=lightgreen]The text in this paragraph should be black with a lightgreen background color.[/bgcolor]
Block of Background Color
The [bgcolor] UBB code only changes the background of text. Wherever text doesn't appear the original background color is still present. The [blockcolor] UBB code changes the background color of a rectangular block.

[blockcolor=lightgreen]
The text of these two paragraphs should be black with a lightgreen background color.

The green background should fill the entire rectangular area behind all text and images.

[/blockcolor]
Email Links
To add a hyperlinked email address within your message, just encase the email address as shown in the following example (UBB codes are in red).

[email]admin@evcforum.net[/email]

In the example above, the UBB codes automatically generate a hyperlink to the email address that is encased.

You can also use this form to provide a name different from the actual email address:

[email=admin@evcforum.net]Contact Us[/email]

Bullets/Lists
You can make bulleted lists or ordered lists (by number or letter).

Unordered, bulleted list:

[list]
[*] This is the first bulleted item.
[*] This is the second bulleted item.
[/list]

This produces:

  • This is the first bulleted item.
  • This is the second bulleted item.
Note that you must include a closing [/list] when you end each list.

Making ordered lists is just as easy. Just add either [LIST=A] or [LIST=1]. Typing [List=A] will produce a list from A to Z. Using [List=1] will produce numbered lists. You can also begin a list at any value, such as [LIST=E] or [LIST=27].

Here's an example:

[list=A]
[*] This is the first bulleted item.
[*] This is the second bulleted item.
[/list]

This produces:

  1. This is the first bulleted item.
  2. This is the second bulleted item.
Adding Images
To add a graphic within your message, just encase the URL of the graphic image as shown in the following example (UBB codes are in red).

[img]http://www.infopop.com/artwork/footer_logotype.gif[/img]

In the example above, the UBB codes automatically makes the graphic visible in your message. Note: the "http://" part of the URL is REQUIRED for the [img] code. Also note: some UBB forums may disable the [img] tag support to prevent objectionable images from being viewed.

Quoting Other Messages
To reference something specific that someone has posted, just cut and paste the text and enclose it as shown below (UBB codes are in red).

[quote]Ask not what your country can do for you....
ask what you can do for your country.[/quote]

In the example above, the UBB codes automatically blockquotes the text you reference to give this appearance:

quote:
Ask not what your country can do for you....
ask what you can do for your country.

Quotes can be nested within one another. There is also a shaded version of quoting:

[qs]Ask not what your country can do for you....
ask what you can do for your country.[/qs]

This example yields this appearance:

Ask not what your country can do for you....
ask what you can do for your country.

And you can optionally provide the name of the person being quoted:

[qs=John F. Kennedy]Ask not what your country can do for you....
ask what you can do for your country.[/qs]

Which would look like this:

John F. Kennedy writes:
Ask not what your country can do for you....
ask what you can do for your country.

Linking to Messages
A link to a message can be created using the [msg] UBB code.

This will create a link to message 21 in the current thread:

[msg=21]

The link would look like this:

Message, Thread and Forum Links (Message 21)

The message is in thread 32, and this will create a link to the same message 21 from a different thread in the same forum:

[msg=32,21]

The links and related text might look like this:

Message, Thread and Forum Links (Message 21 of Thread New Features

The message is in thread 32 of forum 20, and this will create a link to the same message 21 from a thread in a different forum:

[msg=20,32,21]

The links and related text might look like this:

Message, Thread and Forum Links (Message 21 of Thread New Features in Forum Announcements)

Include minus signs in front of the numbers to exclude the message subtitle, the thread link or the forum link:

[msg=-20,-32,-21]

The link would look like this:

Message 21
Linking to Threads
A link to a thread can be created using the [thread] UBB code.

This will create a link to thread 32 in the current forum:

[thread=32]

The link would look like this:

Thread New Features

The thread is in forum 20, and this will create a link to the same thread 32 from a different forum:

[thread=20,32]

The links and related text would look like this:

Thread New Features in Forum Announcements

Include minus signs in front of the numbers to exclude the word "Thread" or the forum link:

[thread=-20,-32]

The link would look like this:

New Features
Linking to Forums
A link to a forum can be created using the [forum] UBB code.

This will create a link to forum 20 in the current forum:

[forum=20]

The link and related text would look like this:

Forum Announcements

Include a minus sign in front of the number to exclude the word "Forum":

[forum=-20]

The link would look like this:

Announcements
Indentation
A region of indented text can be created using the [indent] UBB code.

[indent]This line will be indented [/indent]

Code Tag
Similar to the Quote tage, the Code tag adds some <PRE> tags to preserve formatting. This is useful for displaying programming code, for instance.

[code]#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "Hello World!"; [/code]

In the example above, the UBB codes automatically blockquotes the text you reference and preserves the formatting of the coded text.



Of Note
You must not use both HTML and UBB codes to do the same function. Also note that the UBB codes are not case-sensitive (thus, you could use [URL] or [url]).

Incorrect UBB codes Usage:

[url] www.infopop.com [/url] - don't put spaces between the bracketed code and the text you are applying the code to.

[email]info@infopop.com[email] - the end brackets must include a forward slash ([/email])

 
 

© Copyright 2004 by EvC Forum, All Rights Reserved