Pocket-Monkey(tm) Discussion Forum

[Home] | [New Forums Beta Test] | Forum Tags 101[Forum Rules] [Login]

Forum Tags 101

Thread #3 - Messages: 2   (some may be hidden) **This thread is closed** 
 Forum Tags 101 Message #4    Replies: 1
posted by T.J. (T.J. Crowder) on 11/26 at 01:56
A quick FAQ on Forum Tags

This information will find its way into the help page when I get a chance to write it, but in the mean time, here are the basics of forum tags (also known as UBB code, or vB code):

Overview
Forum tags are a bit like HTML tags, but they use [ and ] instead of < and >, and only a small subset of HTML functionality is supported. Tags typically surround the text they operate on, so for instance "this is [b]bold[/b]" displays as "this is bold". Start tags look like [xyz], end tags look like [/xyz].

Decoration
You can make your text boldfaced, italicized, and/or underlined; some examples:
    [b]boldface[/b]
    [i]italics[/i]
    [u]underlining[/u]
You can combine these, so "[b][i]wow![/i][/b]" shows up as "wow!".

Links
You can make a web address a link by putting it inside [url] tags, e.g.: [url]www.pocket-monkey.com[/url] becomes http://www.pocket-monkey.com (that's a link; hover your mouse over it to see).

You can also use descriptive text for the link by putting the address inside the start tag with an equal sign (=) in front of it, and putting your text between the tags. So [url=www.pocket-monkey.com]nifty game site[/url] becomes nifty game site (that's also a link; hover your mouse over it...).

Email Links
You can do much the same thing with email addresses as with URLs: [email]tj@pocket-monkey.com[/email] becomes tj@pocket-monkey.com (an email link), and [email=tj@pocket-monkey.com]my email address[/email] becomes my email address (another email link).

Quoting
If you reply to a message, the dialog box will have an option for quoting the original text of the message you're replying to. It does this (and you can too!) by surrounding the text with [quote] tags. So "John Q. Public wrote: [quote]You think I'm being silly[/quote]" shows up as:
John Q. Public wrote:
You think I'm being silly
Code
You can mark text to be displayed in a monospaced font by surrounding it with [code] tags. At the moment, this always starts a new line, because they translate to HTML <pre> tags. Example: This:

Here's Bart's loop:
[code]for (i = 0; i < 5000; ++i)
{
printf("%s\n", "I will not tell tales out of school.");
}[/code]

(there are four spaces before "printf", but they won't show up in the browser) displays as:

Here's Bart's loop:
for (i = 0; i < 5000; ++i)
{
printf("%s\n", "I will not tell tales out of school.");
}
Lists
You can create lists of things by using [list] tags (which have both a beginning and an end) with bullet items in them, each bullet item starting with [*] (there is no end tag for the bullet items). So this text:

[list]
[*]One
[*]Two
[*]Three
[/list]

shows up like this:
  • One
  • Two
  • Three
You can also create numbered lists, by putting an "=1" in the opening [list] tag:

[list=1]
[*]One
[*]Two
[*]Three
[/list]

shows up like this:
  1. One
  2. Two
  3. Three
Other choices are "A" for an alphabetically-"numbered" list, "a" for the same thing in lower case, "I" for Roman numerals, and "i" for lower-case Roman numerals. Last example:

[list=i]
[*]One
[*]Two
[*]Three
[/list]

shows up like this:
  1. One
  2. Two
  3. Three
Manual Line Breaks
Normally, if you press [Enter] in the message, a line break
like
these
ones
will show up in your message. However, some tags (like [quote]) "eat" line breaks near them because it makes things a bit easier when you're writing the message (since they create their own line breaks). Sometimes, you want to force the forum to include a line break it would otherwise "eat," and for that we have the [br] tag (which has no end tag). So, while this text:

[quote]
But she said "I don't [i]think[/i] so!"
[/quote]

shows up as:
But she said "I don't think so!"
this text:

[quote]
[br]But she said "I don't [i]think[/i] so!"
[/quote]

shows up as:

But she said "I don't think so!"
(See how it keeps that initial line break, because you told it to. Can't see why you'd want to, but there we are.)

Escapes
The astute reader will want to know how I put those tags in this message -- if [b]bold[/b] is supposed to make text bold, how did I put [b]bold[/b] in this message? The answer is an "escape" character. I just put a backslash (\) in front of the opening '[' character of both the start and end tags, like this: \[b]bold\[/b]. That tells the forum to leave them alone. [Note that a "backslash" ('\') is not the same as as "slash" ('/'). Also note that you don't need the backslash in front of all '[' characters, just ones that are part of a forum tag. So for instance, I didn't need them in the brackets surrounding this parenthetical sentence.]

But what if you want to have a backslash in your message? Most of the time, you're fine, just type them and they'll show up normally, they're only special if they're right in front of a '[' character. But if you really, really want to have a backslash in front of a '[', you'll have to put in two backslashes (the first "escapes" the second), like this: "\\[b]this is bold[/b]". (But right now there's a bug in the forums and that doesn't quite work the way it should -- the tags still show up in your message. I'll get to it.)

Clear as mud?
Well that's what the proofreading feature is for! Before you post your message, use the "Proofread First" button to check that your message appears the way you want it to. Believe me, I used it a lot writing this! ;-)

Well, that's about it. Have fun!
--
T.J. Crowder
Pocket-Monkey.com
 
 Re: Forum Tags 101 Message #52    Replies: 0
posted by T.J. (T.J. Crowder) on 11/30 at 11:22
There's another tag: [msg]...[/msg]. See this message for details on how to use it.
--
T.J. Crowder
Pocket-Monkey.com

Forum software by Crowder Software
Pocket-Monkey and the Pocket-Monkey logo are trademarks of T.J. Crowder and Jock Murphy. All other trademarks are the property of their respective owners.