Ouchface
User Control Panel | Member List | FAQ | Privacy Policy | Blogs | Search Forums | Forums Home

What is vB Code?

vB code is a set of tags based on the HTML language that you may already be familiar with. They allow you to add formatting to your messages in the same way as HTML does, but have a simpler syntax and will never break the layout of the pages you are viewing. The ability to use vB Code is set on a forum-by-forum basis by the administrator, so you should check the forum rules when you post a new message.

URL Hyperlinking

If vB Code is enabled in a forum, you can simply type in the full address of the page you are linking to, and the hyperlink will be created automatically. Here are some example links:

  • http://www.vbulletin.com/forum/
  • www.vbulletin.com

Notice that if the address begins with www. you do not need to add the http:// part of the address. If the address does not begin with www. you will need to add the http:// section. You may also use https:// and ftp:// links, and these will be converted into links.

If you want to include the vB Code, you may simply surround the address with [url] tags as shown below. (The vB Code tags are shown in red).

[url]www.vbulletin.com/forum/[/url]

You can also include true hyperlinks using the [url] tag. Just use the following format:

[url=http://www.vbulletin.com/forum/]Click here to visit the vBulletin forums[/url]

This will produce a hyperlink like this: Click here to visit the vBulletin forums.

Note that once again, you need not include the http:// if the address begins www.

You can easily link a phrase to the English language Wikipedia using the [wp] tags, or link to the Doom Wiki using the [dw] tags. Examples:

[wp]Doom[/wp] is replaced with Doom

[dw]Doom[/dw] is replaced with Doom

You can also parameterize these tags similar to the URL tag above; examples:

[wp=Doom (1993 video game)]Doom[/wp] is replaced with Doom

[dw=Doom 1]Doom[/dw] is replaced with Doom

Email Links

To add a link to an email address, you can simply include the email address in your message like this:

myname@domain.com

Note that there must be a blank space, such as a space or a carriage return before the beginning of the address.

You can also use vB Code tags to specify an email address, like this:

[email]myname@domain.com[/email]

You can also add a true email hyperlink using the following format:

[email=myname@domain.com]Click here to email me[/email]

This will produce a hyperlink like this: Click here to email me.

Bold, Underlined and Italic Text

You can make text bold, underlined, italicized, or strikeout by simply surrounding your text with tags as shown below:

  • [b]some text[/b] produces some text
  • [u]some text[/u] produces some text
  • [i]some text[/i] produces some text
  • [s]some text[/s] produces some text

You can also combine all the various text formatting tags. This example uses bold, underlined, italic text:

[i][u][b]Wow there's lots of formatting here![/b][/u][/i]

This example produces this:

Wow there's lots of formatting here!

Bullets and Lists

You can create bulleted or ordered lists in the following way:

Unordered, bulleted list:

[list]
[*]first bulleted item
[*]second bulleted item
[/list]

This produces:

  • first bulleted item
  • second bulleted item

Note that you must remember to close the list with the [/list] tag.

If you would like to create a list ordered numerically or alphabetically, this is just as easy. You simply need to add a little extra code to your [list] and [/list] tags. The extra code looks like =1 (for a numbered list) or =A (for a list from A to Z). Here are some examples:

[list=1]
[*]this is the first numbered item
[*]this is the second numbered item
[/list=1]

This produces:

  1. this is the first numbered item
  2. this is the second numbered item

[list=A]
[*]this is the first alphabetically ordered item
[*]this is the second alphabetically ordered item
[/list=A]

This produces:

  1. this is the first alphabetically ordered item
  2. this is the second alphabetically ordered item

Adding Images or Videos

To include a picture or graphic within the body of your message, you can simply surround the address of the image as shown here:

[img]http://www.doomworld.com/vb/images/vBulletin_logo.gif[/img]

Note that the http:// part of the image URL is required for the [img] code.

You can even create a thumbnail-type hyperlink by surrounding your [img] code with a [url] code like this:

[url=http://www.doomworld.com/vb/images/vBulletin_logo.gif][img]http://www.doomworld.com/vb/images/vb_bullet.gif[/img][/url]

This produces a link like this: 0.

To embed a YouTube video within the body of your message, surround the 11-character video ID parameter from the video's watch page URL with [yt], [youtube], or [video] tags as shown here:

[yt]jLKnCeeAW48[/yt]

Quoting Other Messages

To quote something that has already been posted, simply cut-and-paste the text you want to quote, and enclose it as follows:

[quote]No. Try not.
Do or do not, there is no try.[/quote]

The [quote] tags will automatically indent the enclosed text.

Hiding spoilers

To hide something that you do not wish readers to see unless they click a button to reveal it, enclose your statement in spoiler tags as follows:

[spoiler]Trinity dies at the end of The Matrix: Revolutions![/spoiler]

The content inside the [spoiler] tags will not be revealed until the "Show" button is pressed.

The Code and PHP Tags

If you want to post some programming source code, or perhaps some ASCII art, which would require a non-proportional font, you can use the [code] tag to achieve this. For example:

[code]
<script language="Javascript">
<!--
alert("Hello world!");
//-->
</script>
[/code]

In the example above, the text enclosed in the [code] tags would be automatically indented, and the spacing would be preserved like this:

<script language="Javascript">
<!--
alert("Hello world!");
//-->
</script>

A special case is for code written in the PHP language. If you are posting PHP code, you can enclose the source code in [php] tags, and the script will automatically have syntax highlighting applied:

[php]
$myvar = "Hello World!";
for ($i=0; $i<10; $i++) {
echo $myvar."\n";
}
[/php]

This would produce:

$myvar "Hello World!";
for ($i=0$i<10$i++) {
	echo $myvar."\n";
}

Incorrect vB Code Usage:

  • [url] www.vbulletin.com [/url] - don't put spaces between the bracketed code and the text you are applying the code to.
  • [email]myname@domain.com[email] - the end brackets must include a forward slash ([/email])

< Contact Us - Doomworld >

Powered by vBulletin
Copyright vBulletin Solutions, Inc.