Posting BBCode on the forum - PCWiki
 |  RSS
Subscribe to magazine
Personal tools

PC World Documents

Views

Posting BBCode on the forum

From PCWiki
Revision as of 05:05, 8 January 2011 by AgentF (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

BBCode, short for Bulletin Board Code, is the HTML equivalent to formatting on an online forum. It allows you to customize the post while also supplementing content like web links and images. A bonus to writing BBCode is not needing to use the Post Toolbar, so you can make just as complex of a post with the Fast Reply feature which doesn't display the Post Toolbar.


Contents

Important Details

There are two important details to remember when posting BBCode.

1.) BBCodes need to be closed. All but one of the installed BBCodes has an open tag [img] and a close tag [/img] The Horizontal Rule is the only tag that doesn't close.

2.) Just like proper HTML, BBCode needs to be nested properly. If you have one BBCode inside another (nested), the close tags are put in the opposite order they were opened. For example, [b][i]Bolded & italic text[/i][/b]

Basic BBCodes

Bold Text Bolded [b]text[/b]

File:Bold.png

Italic Text Italic [i]text[/i]

File:Italic.png

Underlined Text Underlined [u]text[/u]

File:Underline.png

Strike-through Text Strikethrough [strike]text[/strike]

File:Strike.png

Left Align [left]{content}[/left]

By default, all content is aligned to the left of the post. Unless it's nested within a larger section that's aligned to the center or right, you don't need to format content to align left.

Center Align [center]Text aligned center[/center]

Right Align [right]Text aligned right[/right]

Horizontal Rule [hr]

A line that stretches across the width of the post. It is the only BBCode tag on PCWorld Forums that doesn't have a closing tag.

File:Hr.png

Indent [indent]Indented text[/indent]

This works just like using the Tab key. If you try to use two spaces in the row, the forum will only display one to hide what is called "white space". If you want the white space there, use Indent (tabs).

File:Indent.png

Superscript 4[sup]3[/sup]

File:Sup.png

Subscript 4[sub]3[/sub]

File:Sub.png

URL 1 [url]http://forums.pcworld.com[/url]

File:Url1.png

URL 2 [url=http://forums.pcworld.com]PCWorld Forums[/url]

File:Url2.png

Image [img]http://images.pcworld.com/images/shared/icons/miniHeader-logo-7.gif[/img]

File:Img.png

Advanced BBCodes

Acronym [acronym=Laugh Out Loud]lol[/acronym]

Hovering your mouse over the acronym will reveal the whole name.

File:Acronym.png

Background color 1 [background=#FFFF00]Yellow background[/background]

You can set a hexadecimal color value to change the section's background color.

File:Background1.png

Background color 2 [background=cyan]Cyan background[/background]

"Web safe" color names and the 16 colors supported by xHTML can be used too. Unfortunately, RGB color values cannot.

File:Background2.png

Color text [color=red]Red text[/color]

The same options that work with background colors apply to text colors.

File:Color.png

Font tag Arial Black [font=Arial Black]text[/font]

For the reader to see the text in the font you choose, their computer needs to have it installed. Otherwise, their web browser will render it with one from the same (or more universal) font family. It's best to use the more common fonts: Arial, Arial Black, Arial Narrow, Book Antiqua, Century Gothic, Comic Sans MS, Courier New, Franklin Gothic Medium, Garamond, Georgia, Impact, Lucinda Console, Lucinda Sans Unicode, Microsoft Sans Serif, Palatino Linotype, Tahoma, Times New Roman, Trebuchet MS, or Verdana. The default font is Arial.

File:Font.png

Size tag Size 7 [size=7]text[/size]

Numbers 1-7 can be set as font sizes where 7 is the largest. The actual default font size of 12px cannot be set with the Size tag. Size 2 is the closest at 13px.

File:Size.png

Email address [email=me@mail.com]Email me[/email]

Provides a hyperlink to your email address. Depending on the reader's web browser settings, clicking it will open up an Email client or an Email website. It's advised not to post your email address because spammers will collect them. You're better off making public posts or private messages to communicate on PCWorld.

File:Email.png

Member [member=agentf]

Provides a hyperlink (URL) to a user's profile page. You don't need to type their userID number, just their name.

File:Member.png

Post Link [post=430435]Java Errors[/post]

Every post has a postID. To find the postID, open up a discussion topic and look in the upper-right corner of each post. You'll see the first post says #1, the second post says #2 and so on. Those are hyperlinks, too. The last set of numbers in the post's link is the postID. (ex. http://forums.pcworld.com/index.php?/topic/103531-java-errors/page__view__findpost__p__430435)

File:Post.png

Post Snap Back [snapback]430435[/snapback]

Creates an image icon linking to the post.

File:Snapback.png

Topic Link [topic=103531]Java Errors[/topic]

Just like every post has a PostID, every topic has a topicID. The topic ID is the first set of numbers in the link. (ex. http://forums.pcworld.com/index.php?/topic/103531-java-errors/page__view__findpost__p__430435)

File:Topic.png

Twitter [twitter]pcworld[/twitter]

Adds a link to the user's Twitter account.

File:Twitter.png

Code [code][b][i]Bold & italic text[/i][/b][/code]

The Code tag is helpful when you want to display BBCode and not actually use it. In addition, "white space" won't be erased. I cannot explain why some text changes colors in the Code tag.

File:Code.png

HTML Code [html]<a href="http://forums.pcworld.com/" title="PCWorld Forums"></a> <img src="http://images.pcworld.com/images/shared/icons/miniHeader-logo-7.gif" alt="" />[/html]

The HTML tag allows HTML code to be displayed on the forum and also color codes the tags for easy viewing.

File:Html.png

PHP Code [php]{content}[/php]

SQL Code [sql]{content}[/sql]

XML Code [xml]{content}[/xml]

These three codes work just like the HTML code tag.

List 1 [list][*]Item1[*]Item2[/list]

In order to make a list, each item needs to have [*] before it. This type of list is called an unordered list because bullets are used.

File:List1.png

List 2 [list=I][*]Item1[*]Item2[/list]

An ordered list replaces bullets with numbers or letters. Uppercase and lowercase letters can be used, along with regular numbers and Roman Numerals, too.

File:List2.png

Media [media]http://www.youtube.com/watch?v=ji5_MqicxSo[/media]

You can insert videos into a post by posting the URL within the media tags.

File:Media.png

Quoting

Quoting seems to give people the most trouble on the PCWorld Forums. In the lower-right corner of a post are two gray links: Reply and Multiquote. They are used when you want to quote that particular post by using BBcode and reply to it. The Reply button means only quote that post. Multiquote allows you to quote multiple posts on that page. So you can click Multiquote on multiple posts in that thread and then reply to each of them in a single post. Convenient, right?

At the very top and very bottom of the discussion thread, there is a red Add Reply link. This will take you to the reply screen without any quote BBcode unless you've Multiquoted some posts.

File:Quoting.png

When quoting multiple posts in a single reply, only 5 quote tags can be used per post.

Quote 1 [quote]Quote me.[/quote]

This puts a quote box around the text but doesn't add the name or date of the post you quoted.

File:Quote1.png

Quote 2 [quote name='AgentF' timestamp='1269534487' post=335960]Thanks for answering my question, Car54.[/quote]

You can add three attributes to the Quote tag: the poster's name, the time when the post was made, and the PostID number. The timestamp is the number of seconds since January 1, 1970. It's a common way for programming scripts to keep track of the time. The name and timestamp attributes must be surrounded by appostrophies for them to work.

File:Quote2.png

Spoiler [spoiler]Some hidden text[/spoiler]

The Spoiler tag adds JavaScript to hide content and allow the reader to "Show" it if they choose. This is great if you're posting an extensive error log because not all readers will need to scroll endlessly to the bottom of the page.

File:Spoiler.png

Nesting BBCode Examples

Multiple Text Formatting [color=teal][i]E=MC[sup]2[/sup][/i][/color]

File:Text-formatting.png

Image linked to a URL [url=http://www.pcworld.com/][img]http://images.pcworld.com/images/shared/icons/miniHeader-logo-7.gif[/img][/url]

Text aligning [center]Whole section centered[left]Left text[/left]Centered again[/center]

List within a list [list=I][*]Item 1[list=A][*]Item A[*]Item B[/list][*]Item 2[list=A][*]Item A[*]Item B[/list][/list]

File:List-in-list.png

Quote within a quote [quote name='Car54' timestamp='1269539801' post=336001][quote name='AgentF' date='25 March 2010 - 11:28 AM' timestamp='1269534487' post=335960] I'm a fan of the quick reply tool because it's one less page for me to load.[/quote]I agree, it is a very quick and easy way to reply to a post.[/quote]

File:Quote-in-quote.png

Useless BBCodes

Although installed, the following BBCodes are presently useless on the PCWorld Forums.

Blog Entry Link [entry={option}]{content}[/entry]

Blog Link [blog={option}]{content}[/blog]

Extract Blog Entry [extract]{content}[/extract]

Name City
Address 1 State Zip
Address 2 E-mail (optional)