Art of Problem Solving

BBCode:Tutorial: Difference between revisions

Line 158: Line 158:


==Other Stuff==
==Other Stuff==
There are other things you can do with BBCode that do not have buttons in the AoPS communtiy.
===Lists===
===Lists===
There are several types of list in BBCode.
There are several types of list in BBCode.
====Unordered List====
An unordered list is a simple bullet point list. To use it, you simply use the [list] tag. Before each new list item, type [*]. The [*] tag is for a list item. You don't need a closing tag for the [*] tag. For example, typing
:<code>
:[list]
:[*] pizza
:[*] pasta
:[*] rice
:[*] cereal
:[/list]</code>
creates:
<ul>
<li>pizza</li>
<li>pasta</li>
<li>rice</li>
<li>cereal</li></ul>
====Ordered List====
====Ordered List====
Say you want to make the list:


:Top 5 most important people of all time:
<ol>
:<li>Richard Rusczyk</li>
:<li>David Patrick</li>
:<li>Isaac Newton</li>
:<li>George Washington</li>
:<li>Thomas Edison</li>
</ol>


The bbcode for this uses the [list] tag. To tell you want a numbered list, type [list=1]. The [*] tag is for a list item. You don't need a closing tag for the [*] tag. To type the above example, you would write:
The bbcode for this uses the [list] tag. To tell you want a numbered list, type [list=1]. For example, typing,
:<code>
:<code>
:Top 5 most important people of all time:
:Top 5 most important people of all time:
Line 182: Line 190:
:[*]Thomas Edison
:[*]Thomas Edison
:[/list]</code>
:[/list]</code>
creates
:Top 5 most important people of all time:
<ol>
:<li>Richard Rusczyk</li>
:<li>David Patrick</li>
:<li>Isaac Newton</li>
:<li>George Washington</li>
:<li>Thomas Edison</li>
</ol>


Alternatively, if you want to make a lettered list, start with [list=A] or [list=a]. For a roman numeral list, use [list=i] or [list=I].
Alternatively, if you want to make a lettered list, start with [list=A] or [list=a]. For a roman numeral list, use [list=i] or [list=I].


===Python===
===Python Tags===
If you are taking one of the AoPS programming with [[Python]] classes, you may need to use python in a forum. There are two ways to do this.
If you are taking an AoPS programming with [[Python]] class, you may need to post some Python code in the class forum. To do this you use the [python] tags.
====Python Tags====
These tags are like the [code] tags except that they show the python code in colors.
These tags are like the [code] tags except that they show the python code in colors.
For example, typing
For example, typing
Line 202: Line 220:


===Aops font===
===Aops font===
<i>Main article: [[AoPS font]]</i>
Say you want to type the <span class="aops-font">Y</span> symbol on a forum post. You can use the [aops][/aops] tags to create symbols like this. For example, typing
:<code>[aops]Y[/aops]</code>
makes the  <span class="aops-font">Y</span> symbol. For a guide to how to type other symbols, see the [[AoPS font]] page.

Revision as of 17:10, 24 June 2015

This page is under ongoing construction



The Basics

Bbcode is a way to format text in forum posts. It is in some ways similar to HTML. It uses tags, which are little pieces of code enclosed in brackets, such as [b] to make bold text. For every tag, you need a closing tag too. The closing tag is the same as the opening tag except that it has a / symbol at the front. For example, the tag [/b] is code for "stop making the text bold." There is text between the opening and closing tags, that is the text that is modified by the tags.

For example, If you want to say "I love pizza" and want the word "love" to be in bold, you would type

I [b]love[/b] pizza.

This would create, "I love pizza."

Writing Messages in the AoPS Community

The Buttons

Error creating thumbnail: File missing

This is a picture of what you see when you create a topic or post a reply.

The bold Button

The Error creating thumbnail: File missing button is for bold tags. When you click on it, your screen should look like this:

Error creating thumbnail: File missing

These are called bold tags. Then, you can type in any text you want: Error creating thumbnail: File missing

When you submit it, it should look like this:

The Italics Button

The Error creating thumbnail: File missing button is the italics button. When you click on it, your screen should look like this:

Error creating thumbnail: File missing

Then you can type in your italicized message:

Error creating thumbnail: File missing

When you submit, it should look like this:

Error creating thumbnail: File missing

The Underline Button

The Error creating thumbnail: File missing button is for underlining text. When you click on it, the symbols [u] and [/u] appear. Then you can type in whatever you want to be underlined:

Error creating thumbnail: File missing

When you submit it, it should look like this:

Error creating thumbnail: File missing

Note: you can also highlight text and then click the underline button.

The Quote Button

The Error creating thumbnail: File missing button is for quoting text. You can write an anonymous quote, or quote a specific user or person. When you click on it, you get [quote] and [/quote]. Then type in the quote:

Error creating thumbnail: File missing

When you hit submit, it looks like this:

Error creating thumbnail: File missing

Or, alternatively, you can say who quoted it:

Error creating thumbnail: File missing

And you get this:

Error creating thumbnail: File missing

You can also quote a post by clicking this button in the forum.

Error creating thumbnail: File missing

You will be taken to a reply page that looks like this:

Error creating thumbnail: File missing


The Hide Button

The Error creating thumbnail: File missing button embeds text in a little interactive clicky. This is useful if you want your text only visible if the reader wants to see it. For example, if you are answering a math problem, you can hide the text so that you don't give away the answer to someone who doesn't want to know it.

Start by clicking the hide button. You should get [hide] and [/hide]. Then put in your text:

Error creating thumbnail: File missing

When you submit, you get this:

Error creating thumbnail: File missing

If you click on the words "Hidden Text", you get this:

Error creating thumbnail: File missing

Or you can label your hidden text. First, write in the code of the hidden text something like:

[hide=answer]Because 6x=y, and y is 6, then x must be 1.[/hide]


And then submit, you get:

Error creating thumbnail: File missing

Error creating thumbnail: File missing

The Code Button

The Error creating thumbnail: File missing button is for posting code that you don't want to be rendered, ie LaTeX or BBCode. When you click on it, your screen should display:

[code][/code]

Type in your code:

[code]$10+9=21$[/code]

And it should display:

Notice that the LaTeX code is not rendered; that is, it does not show up as $10+9=21$.

The Image Button

The button is for embedding images in posts. If you have this image:
http://artofproblemsolving.com/assets/images/logo-ludicrous.gif
And you want it to show up like this:

You use [img] tags. Click on the button and your screen should show:

[img][/img]

Now insert the link to the image. Make sure it is a direct link.

[img]http://artofproblemsolving.com/assets/images/logo-ludicrous.gif[/img]

When you submit, you should get the image!

The URL Button

The button is for parsing and naming URLs. If you click it, your screen should look like this:

[url][/url]

Now type in your URL:

[url]http://www.aops.com/[/url]

When you submit it, it should be parsed, like this:

http://www.aops.com/

Alternatively, if you want a link that goes somewhere but is not actually named the URL, do this:


[url=http://www.aops.com/] Click here.[/url]

You get

Click here.

Other Stuff

There are other things you can do with BBCode that do not have buttons in the AoPS communtiy.

Lists

There are several types of list in BBCode.

Unordered List

An unordered list is a simple bullet point list. To use it, you simply use the [list] tag. Before each new list item, type [*]. The [*] tag is for a list item. You don't need a closing tag for the [*] tag. For example, typing

[list]
[*] pizza
[*] pasta
[*] rice
[*] cereal
[/list]

creates:

  • pizza
  • pasta
  • rice
  • cereal

Ordered List

The bbcode for this uses the [list] tag. To tell you want a numbered list, type [list=1]. For example, typing,

Top 5 most important people of all time:
[list=1]
[*]Richard Rusczyk
[*]David Patrick
[*]Isaac Newton
[*]George Washington
[*]Thomas Edison
[/list]

creates

Top 5 most important people of all time:
  1. Richard Rusczyk
  2. David Patrick
  3. Isaac Newton
  4. George Washington
  5. Thomas Edison

Alternatively, if you want to make a lettered list, start with [list=A] or [list=a]. For a roman numeral list, use [list=i] or [list=I].

Python Tags

If you are taking an AoPS programming with Python class, you may need to post some Python code in the class forum. To do this you use the [python] tags. These tags are like the [code] tags except that they show the python code in colors. For example, typing

[python]
print("hello"+" world")
print("Hello, world!")
[/python]

Yields

Aops font

Main article: AoPS font

Say you want to type the Y symbol on a forum post. You can use the [aops][/aops] tags to create symbols like this. For example, typing

[aops]Y[/aops]

makes the Y symbol. For a guide to how to type other symbols, see the AoPS font page.