Jump to content

Forum code: the basics

Recommended Posts

Hey people, today we're gonna talk about BBCode, the best way to create cool posts with pictures, links, words or sentences in bold, italic, etc, etc.


What is BBCode?


BBCode is similar to HTML, except that it is much more simple and user-friendly. In fact, it's something like a shortcut to classic HTML commands, saving you the pain of having to type weird things normal people can't understand. When you add BBCode elements to a post, you are, in fact, typing a program. Wow, impressive, isn't it? Ayup, no kidding, you are entering requests that will be executed by the server that runs this very forum. Now that you are a gifted coder, let's see what we can do with BBCode stuff.


Alright, if you really wanna know... there are tons of things you can do thanks to BBCode. You can add LINKS to other sites. You can QUOTE other people, rather than just copy, paste sentences then just add quotes to them. You can post PICTURES (see the small tutorial I've just written, in this very section of the forum). You can do lots of funny things.


How does it work?


You know what we gamers call a "clan tag", don't you? It's the two or three letters, generally between brackets or so, that you see just before our names when we play online. See my signature? My gamer's nickname is Aleister.C, while my clan tag is =NS=. Now, BBCode works with tags, too. I know, it was a bad example, I couldn't find anything better, but well... So. In order to validate a command, like "please post a picture here, Mr. Server!", you have to add OPEN tags and CLOSE tags respectively right before and right after the element you wish to modify. The effect depends upon the kind of tag you will use. All CLOSE tags are exactly the same as OPEN tags, but with a righ-slashbar. Like this:


[b] hello, I'm the OPEN tag for BOLD
[/b] hello, I'm the CLOSE tag for BOLD

and this is what you get when you add both OPEN and CLOSE tags to a sentence


List of commands


This list might not be the most complete around, but here are the commands that people use most of the time on forums:


[code]enter text here[ /code] : Just as I did to create this board, this allows you to prevent the server from executing commands. Very handy when you wish to write tutorials about BBCode... Note: I had to add a space that is not supposed to be there in the CLOSE tag, because this is the only tag you cannot display properly when you use the... code tag. Yeah I know, that's kinda funny.

[img=enter url here] : See the topic called "how to post images on forums" in the same section of the forum to learn how to... yeah, you got it.

[b]enter text here[/b] : Bold style

[i]enter text here[/i] : Italic style

[size=enter value here]enter text here[/size] : Modify font size. Value range varies from forum to forum. If I remember well, regular text on this board must be 8pts, so, a value of "16" will make letters look quite big already.

[quote]add text here[/quote] : Allows you to quote other people. Will add a small board around the text. Some forums also allow the use of names, and even date and time, as details for the QUOTE tag, like this: [quote=RXS] or [quote=Alesiter.C]. Note that sometimes, you will have to add quote bunnies like this : [quote="RXS"] or [quote="Aleister.C"]. This tag is usefull when you don't wish to quote a whole post, or when the "quote" button doesn't work, which is the case on this forum today :P (In fact I noticed that the "quote" button acts weird only when you have two UnityHQ windows open at the same time, one of the two being an "add reply" or "new topic" window. I'm sure that EliteOne is very impressed, now :D )

[color=enter name of color here]enter text here[/color] : Modifies text color. color names are completely standard, like black, red, blue, etc. Variables are "light" and "dark". For example, the three shades of blue are "lightblue", "blue" and "darkblue".

[color=enter value here]enter text here[/color] : Same as above, but for people who know the hexadecimal values of colors. Not for normal human beings. Ah, if I remember well, black is "00000". Maybe I'm wrong, who cares.

[url]add URL here[/url] : Allows creation of clickable links. If you type something like www.mywebsite.com, some forums will automatically turn it into a clickable link, but some others will not, unless you add the [url] taggs manually.

[url=add URL here]enter text here[/url] : Even better, this one allows you to "hide" the URL of your link, and name it as you wish. For example, the URL of a page you want to link to is veeeerrrrryyyy long, say http://www.incrediblylongurls.com/uselessfolder/thisisthepageiwanted.htm. Well, you see what I mean. You can add the url INSIDE the tag, instead of posting it in your message. If your tag looks like this:

[url=http://www.incrediblylongurls.com/uselessfolder/thisisthepageiwanted.htm]my personal page[/url]

... then people will only see a clickable link called "my personal page". Cool, eh?

[u]enter text here[/u] : Underlines the text between the tags.


Then what's the deal with the buttons I see above my text block, when I type a new message or reply?


These buttons can be quite useful, most of the time they'll save you some time. They work very simply. Click a button once, and it will add an OPEN tag right where your text cursor is. You can then type your text, but make sure you click "close all tags" before you post your message.


More simple, you can select a piece of your text, then click one of the buttons, and it will add both OPEN and CLOSE tags to it, automatically.


Personaly, I don't use them very often, for a good reason: I post most of my message via the "fast reply" button. It saves some time, because it doesn't load a new page. So, it can be quite cool to know the basic BBCode commands...




Well, I think that's it. If you think of more commands that should be added to the list, feel free to post them here!

Link to comment
Share on other sites

Gen, might be an idea to edit the above and add an example for image links. E.g.:



That would give you a nice piccy instead of a text link.


I'll delete this post if you do.

Link to comment
Share on other sites

Join the conversation


Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.


×   Your previous content has been restored.   Clear editor



  • Create New...

Important Information
