Welcome Guest [Log In] [Register]
Add Reply
BBCode Collection Topic
Topic Started: Aug 15 2011, 03:44 PM (3,093 Views)
Rescla
Member Avatar
Resident Lazy Coder
BBCode are special tags you can use in your posts to do all sorts of fancy things. A list of most BBCode can be found here but it is not complete and contains but few examples and doesn't cover everything. I hope this helps some of you new people out, and for the regulars this should be a neat reference.

Basic BBCode
BoldBolds a section of text[b]sample[/b]sample
ItalicsCursives a section of text[i]sample[/i]sample
UnderlineUnderlines a section of text[u]sample[/u]sample
StrikeStrikes a section of text through[s]sample[/s]sample
SmallerMakes a section of text smaller by one level[small]sample[/small]sample
[small][small][small]sample[/small][/small][/small]sample
BiggerMakes a section of text bigger by one level[big]sample[/big]sample
SubtextMakes a section of text subtextH[sub]2[/sub]OH2O
SupertextMakes a section of text supertextE=MC[sup]2[/sup]E=MC2
CenterCenters a section of text[center]sample[/center]sample
RightAligns a section of text to the right[right]sample[/right]sample
IndentInserts 5 spaces as a replacement for tab[indent]sample     sample
MeInserts the writer's username and creates a hyperlink to the userpage1I am [me]I am Rescla
HorizontalCreates a horizontal line that devides two sections of textsample 1[hr]sample 2sample 1
sample 2
HyperlinkCreates a link to a webpage[url=http://google.com]sample[/url]sample
RollUsed to simulate a rolling dice. The first number represents the number of dice rolled, the second represents the number of sides each dice has and the third number is added to every outcome. The addition has to come after the second number, and it can be replaced by another dice roll. After posting you can not edit said post, so be sure your post doesn't contain any errors.[roll]1d7+1[/roll][result]8&7,1d7,1,8&1d7+1[/result]
ListCreates a list, dots must be placed before entries. The argument can be a or 1, for alphabetic and numerically sorted lists respectively.[list][*]1[*]2[/list]
  • 1
  • 2
[list=a][*]1[*]2[/list]
  1. 1
  2. 2
ImageIncludes a image, please make sure that you use a image file like .png, .jpg, .jpeg, .bmp, etc and not a webpage.[img]http://z4.ifrm.com/static/avatars/107.png[/img]Posted Image
FlashFlash can be used to include youtube videos, the width and height of the video can be defined. As such, it can be slimmed down to an audio player when using low dimentions[flash=100,100]http://www.youtube.com/v/z7SeHqxOVYc[/flash]
TableTables can be created using this, the value represents the number of horizontal cells. Cells are separated by [c]. Tables can also be given a title.[table=2,title]1[c]2[c]3[c]4[/table]
title
12
34
NoCodeCan be used to stop BBCode from being processed[nocode][b]sample[/b][/nocode][b]sample[/b]
1The hyperlink is created after posting, only your name will show up in the preview.

Colors Fonts and Borders
ColorColors a section of text. For color references use this site, use the hexadecimal values if the named ones don't work.[color=gold]sample[/color]sample
[color=#aa0011]sample[/color]sample
BgcolorColors the background of a section of text. The same rules for color selection apply.[bgcolor=green]sample[/bgcolor]sample
BorderCreates a border around a section of text. You can change the color, thickness and style.[border=red]sample[/border]sample
Colors are the same as before, styles can be dashed or dotted.1[border=red,2,dashed]sample[/border]sample
FontChanges the font of a section of text. Various fonts can be used. The argument given is directly parsed into a font-family style, different browsers support different fonts.2[font=console]sample[/font]sample
1Perhaps there are more, but those are the 2 I managed to find.
2Fonts include but are not limited too: Courier, Garamond, Tahoma, Verdana(default), WebDings, console, Arial


Containers
QuoteCreates a quote, a title and subtitle (aligned right) can be defined but are not required.[quote=sample1,sample2]sample3[/quote]
sample1
sample2
sample3
SpoilerCreates an expandable container that can be given a title, but it is not required[spoiler=sample1,sample2]sample3[/spoiler]
sample1,sample2
CodeCreates a container in which all HTML and BBCode is ignored. The font is changed to console. It is also namable.[code=sample]<html>
<head>
<title>Vagrant Epochers</title>
</head>
<body>
<p class="intro">Welcome</p>
<body>
</html>[/code]
See the code block named Example 1
HTMLUsable in a similar way to Code, but HTML markup is applied for easier readability. Also, unlike a code block it cannot be named.[html]<html>
<head>
<title>Vagrant Epochers</title>
</head>
<body>
<p class="intro">Welcome</p>
</body>
</html>[/html]
See the code block named HTML
Code: Example 1
 
<html>
<head>
<title>Vagrant Epochers</title>
</head>
<body>
<p class="intro">Welcome</p>
<body>
</html>
Code: HTML
 
<html>
<head>
<title>Vagrant Epochers</title>
</head>
<body>
<p class="intro">Welcome</p>
</body>
</html>

You can also add a timestamp, much the same as you get when you directly quote a message. The value used is UNIX time, converting a date to UNIX time can be done on this site. For example, the 15th of August 19:42:19 amounts to 1313429899. You can use it in a quote like this:
Title
Aug 15 2011, 12:38 PM
[quote=Title,{time=1313429899}]sample[/quote]
But also in a sentence, {time=1313429899} creates Aug 15 2011, 12:38 PM

NOTE, replace all curly brackets with round brackets.


This took a good while to make, if I missed anything or if there are any suggestions feel free to post. I'll ad the dice rolling output later, if this doesn't kill my editing abilities already. If it does I'll just have to ask Naka to edit it. Categories are up to discussion.

[edit]It DID kill my edit button, but not my ability to edit my post. Hurray! The only problem is that I can't show the code. I probably could edit the plugin code, I'll have to ask Naka about it though. For now, coming soon.
[edit2]Seems like the code and HTML containers are bugged. How annoying.
[edit3]Added list and table, I forgot those. And updated the dice entry, see if this works. Also, the time tags are working too well. I'll change that tomorrow though.
[edit4]Tidied things up and worked around the time= problem.

Credits to Speedy for giving me the idea.
Edited by Rescla, Jan 6 2012, 01:26 PM.
Offline Profile Quote Post Goto Top
 
Speedy
Member Avatar
Fairly sure I've given up.
I request this topic to be stickied, pinned and whatever other word you can come up with that will make it stand out in the top of the General Discussion area, as soon as possible.
Edited by Speedy, Aug 15 2011, 03:53 PM.
Offline Profile Quote Post Goto Top
 
McDodgerman
Member Avatar
♦ Grazing mindlessly ~
[nocode] does NOT work with the [roll] tags. Something about them working independent of somethingorother. You'll have to break up the tag with something else. I use [i] tags. Put the cursor where you want to break the code/simulate nocode, then hit the Italic button.

[ro[i][/i]ll]1d6[/roll] is how it should look, but iirc it'll look wrong if you try to quote and see what I did.

Note that quoting this message will not allow you to edit your message afterwards, since it will [roll] the dice in this post.

Also, this was what I was spending about five posts in the "Dice roll!" thread testing.

Additional notes:
This script allows any sides of dice, including impossible ones like 1d7.
Adding before the dice is not a valid input, it will ignore your thing. e.g. 1+1d6 will only roll the d6, not add one. You HAVE to put it after e.g. 1d6+1
Anything other than addition will keep you from making a "malformed roll". I haven't tried adding negative numbers, though.
You can add multiple dice e.g. 1d6+1d6. I assume this will also do separate kinds of dice like 1d6+1d20.
Also, it looks like [roll] only works if you follow it with a dice format, so if you don't follow [roll] IMMEDIATELY with 1d6 then you don't have to bother with breaking it with [i].

♦ EDIT // How the hell did you edit your post without the edit button?..[/nocode]
Edited by McDodgerman, Aug 15 2011, 04:06 PM.
Offline Profile Quote Post Goto Top
 
Rescla
Member Avatar
Resident Lazy Coder
Since it is an external plugin I'll have to examine the code directly and work from there. It's a bug anyway, so it won't hurt if it's fixed. Thanks for the info though, I'll put it in for now until I've worked something out.

Also, there is a workaround for the edit problem. I'm not posting it in here though. Even though it doesn't really matter I'd rather not be the one to spread exploits around.

[edit]No matter, I fixed it anyway. Now I have to edit with the "no edit button" problem, but that's not too bad. At least it works now.

If you're wondering how, just put the [i][/i] tags WITHIN the roll tag. Like this: [roll[i][/i]]1d7+1[/roll[i][/i]] = [roll]1d7+1[/roll]. Actually, you only really need one set of i tags to get the job done but it's cleaner this way.
Edited by Rescla, Aug 15 2011, 04:26 PM.
Offline Profile Quote Post Goto Top
 
NakaTeleeli
Member Avatar
Naka the Honeywhite
Seeing as it's made to help others out, I'll go ahead and pin it.
Offline Profile Quote Post Goto Top
 
JBRam
Member Avatar
Don't play with fire, kids.
I often use [roll ] with a space, but it won't look the same :D

Thanks Rescla for putting this all together for us!
Offline Profile Quote Post Goto Top
 
Ghoul
Member Avatar

Thanks. I've seriously been needing something like this...
Offline Profile Quote Post Goto Top
 
Speedy
Member Avatar
Fairly sure I've given up.
Aww man, I totally dont get any credits for giving Rescla the idea to do this. :P
Offline Profile Quote Post Goto Top
 
Ghoul
Member Avatar

He did the work. :P

But thanks nonetheless.
Offline Profile Quote Post Goto Top
 
Ryoukai
Member Avatar
Pariah Prince
if i may, id liek to ask how someone would go about closeing a poll.
Offline Profile Quote Post Goto Top
 
Go to Next Page
« Previous Topic · General Discussion · Next Topic »
Add Reply