Blackcode (bbcode)

blackblog uses an extended version of bbcode, currently the following tags are parsed and translated into HTML:

basic markup


[h1]hello world[/h1]                               -- translates to <h1>hello world</h1>

( also [h2] [h3] [h4] [h5] )

[b]hello world[/b]                                 -- translates  <b>hello world</b>  (bold)

[i]hello world[/i]                                 -- translates  <i>hello world</i>  (italic)

[u]hello world[/u]                                 -- translates  <u>hello world</u>  (underline)

[s]hello world[/s]                                 -- translates  <s>hello world</s>  (stroke)

[quote]hello world[/quote]                         -- translates  <quote>hello world</quote>

[url]http://projects.plentyfact.net[/url]   

-- translates to <a href="http://projects.plentyfact.net">http://projects.plentyfact.net</a>

[url=http://projects.plentyfact.net]plentyfact projects[/url]

-- translates to <a href="http://projects.plentyfact.net">plentyfact projects</a>                                               

images

[img]/media/test.jpg[/img]

-- translates to <img src="/media/test.jpg" />

[img=200x140]/media/test.jpg[/img]

-- translates to <img src="/media/test.jpg" style="width: 200px; height: 140px;" />

[img:This is a rabbit in front of a wood]/media/test.jpg[/img]

-- translates to <img src="/media/test.jpg" alt="This is a rabbit in fron of a wood" />

[img=200x140:This is a rabbit in front of a wood]/media/test.jpg[/img]

-- translates to <img src="/media/test.jpg" style="width: 200px; height: 140px;" alt="This is a rabbit in fron of a wood" />

code

[code]

function help()
   io.write("help")
end

[/code]                                      -- will keep the formatting ( similar to <pre> in html )

</pre>