BB Codes: Examples of Usage (includes codes without buttons)

Questions, answers, and discussion about forum features

BB Codes: Examples of Usage (includes codes without buttons)

New postby DakotaDan on Sat Jan 03, 2009 9:56 am

Most BB codes are accessed using the buttons immediately above the message composition box. However, a few others, which have to be typed, are available, and we can create others if there is interest. Examples of both follow. When using the buttons, either click the button first and then enter your text, or enter your text, double-click it, and then click the button (this works well only with the basic functions for making text bold, italicized, or underlined). Also note that, when you position the cursor on a button, you'll see mouse-over text that shows the syntax.

Bold Text

Enter this:
Code: Select all
Some of this text is [b]in bold[/b].

to get this:
Some of this text is in bold.


Italicized Text

Enter this:
Code: Select all
Some of this text is [i]in italics[/i].

to get this:
Some of this text is in italics.


Underlined Text

Enter this:
Code: Select all
Some of this text is [u]underlined[/u].

to get this:
Some of this text is underlined.


Combining the Effects

As in the titles above, the BB codes can be used in combination. For example, enter this:
Code: Select all
Some of this text is in [b][i]bold italics[/i][/b].

to get this:
Some of this text is in bold italics.


Colored Backgrounds

Okay, so you're wondering how the background color on the titles was produced. That's one of the BB codes without a button. Use the "Font colour" button and "mouse over" to get the code of the color you want (e.g., #FFFF00 for a bright yellow). Then enter something such as this:
Code: Select all
[background=#FFFF00]This text has a yellow background.[/background]

to get this:
This text has a yellow background.


Inserting Images in Posts

To display an image/graphic that appears on another web site, you need it's URL or link (the http://www.etc. business). It works the same way as for the bold BB code. For example, enter this:
Code: Select all
[img]http://apod.nasa.gov/apod/image/0812/as8-14-2383HR_c800.jpg[/img]

to get this:
Image


Inserting Links in Posts

This can be extremely simple or a little tricky depending on how you want to do it. The simplest method is just to paste the URL. The forum software will automatically turn it into a clickable link. For example, type this (and notice that the link works whether or not the http part is included):
Code: Select all
Please visit http://www.laxpower.com or use www.google.com to search for more information.

to get this:
Please visit http://www.laxpower.com or use http://www.google.com to search for more information.

You can also use the "URL" BB code. The basic code works the same way as the bold code. The advanced version allows you to hyperlink text, and the link itself is not displayed. For example, redo the example above like this:
Code: Select all
Please visit [url=http://www.laxpower.com]LaxPower[/url] or use [url=http://www.google.com]Google[/url] to search for more information.

to get this:
Please visit LaxPower or use Google to search for more information.


Changing the Font Face, Size, and Color

There is a dropdown to change font size and a BB code button to change font color. There is also a button-less BB code to change the font face. Here are examples of each plus one combination effect:
Code: Select all
[size=150]This line is done using a "large" font size.[/size]
[color=#800000]And this text appears in dark red.[/color]
[font=Comic Sans MS]And this text is rendered in Comic Sans MS.[/font]
[size=150][color=#800000][font=Comic Sans MS]And all three effects are combined here.[/font][/color][/size]

to get this:
This is a "large" font size.
And this text appears in a dark red.
And this text is rendered in Comic Sans MS.
And all three effects are combined here.


Centering Text, Images, or Whatever

Another button-less BB code will allow you to center lines of text or whatever else you might be entering (e.g., images). Here's an example with text and smilies. Enter this (click the smilie; you don't have to type the code, although you can):
Code: Select all
[center] :violin: So sorry to hear that your team lost. :violin: [/center]

to get this:
:violin: So sorry to hear that your team lost. :violin:


Entering Text in Columns

When text is rendered on a web page, multiple consecutive spaces are collapsed to just one. You can use the button-less "pre" BB code to preserve the spaces, although the text will appear in a monospace font. Enter this:
Code: Select all
[pre]Rank Poll  Team                          Rating SOS   W  L  T
  1    1   Duke                          99.90   7   18- 2- 0
  2    3   Syracuse                      97.77   5   16- 2- 0
  3    4   Johns Hopkins                 96.41   1   11- 6- 0
  4    5   Notre Dame                    96.14  20   14- 3- 0
  5   11   Ohio State                    95.30  13   11- 6- 0
  6    2   Virginia                      95.00   4   14- 4- 0
  7    8   Maryland                      94.93   8   10- 6- 0
  8   11   Georgetown                    94.21  10    9- 4- 0
  9   18   Loyola                        94.10   3    7- 7- 0
10    7   Cornell                       94.00   9   11- 4- 0[/pre]

to get this:
Rank Poll  Team                          Rating SOS   W  L  T
1 1 Duke 99.90 7 18- 2- 0
2 3 Syracuse 97.77 5 16- 2- 0
3 4 Johns Hopkins 96.41 1 11- 6- 0
4 5 Notre Dame 96.14 20 14- 3- 0
5 11 Ohio State 95.30 13 11- 6- 0
6 2 Virginia 95.00 4 14- 4- 0
7 8 Maryland 94.93 8 10- 6- 0
8 11 Georgetown 94.21 10 9- 4- 0
9 18 Loyola 94.10 3 7- 7- 0
10 7 Cornell 94.00 9 11- 4- 0


Embedding YouTube Videos

What you need is the youtube.com URL of the video you want to embed (for example http://www.youtube.com/watch?v=B8K3oyo9Tzw). Just grab the code after the v= and use it like this:
Code: Select all
[youtube]B8K3oyo9Tzw[/youtube]

to get this:


Using the Smilie Sign Creator

See the "sign" BB code button as well as the "Smilie sign creator" link to the right of the message composition area. For a basic sign (with a default smilie), use the button. To control which smilie is used as well as the color and shading on the sign, use the link. For example, enter this:
Code: Select all
[sign]Made using the sign button[/sign]
[sign=11,0,8B0000,FFFFFF]Made using the link[/sign]

to get this:
Image

Image
User avatar
DakotaDan
Site Admin
 
Posts: 11434
Joined: Sat Sep 18, 2004 7:27 pm

Sponsor
 

Return to Using the Forum: Tips and Questions

Who is online

Users browsing this forum: No registered users and 1 guest