Questions tagged [bbcode]

Bulletin Board Code is a lightweight markup language used to format posts in many message boards. There is no "standard" set of BBCodes, but they are typically parsed into other markup languages.

BBCode or Bulletin Board Code is a lightweight markup language used to format posts in many message boards. The available tags are usually indicated by square brackets ([ ]) surrounding a keyword, and they are parsed by the message board system before being translated into markup languages such as HTML.

Unlike SGML-based markup languages, tags in BBCode do not have attributes. Instead, they may have a single parameter attached to them with the equals sign as a separator, such as the "color" tag on phpBB boards, where [color=red] would make red text, for example.

Common tags include:

  • [b] which makes bold text*
  • [i] which makes italic text*
  • [u] which makes underlined text*
  • [s] which makes strikethrough
  • [quote] which makes a block-level quote box of another post*
  • [color] which takes a color parameter and makes colored text*
  • [code] which creates a code block, inside which BBCodes are typically not parsed*
  • [img] which embeds an image inline*
  • [url] which creates a link to a specified location*
  • [spoiler] which creates a button to show/hide contained text
  • [background] which highlights text

* available by default in phpBB 3.0

611 questions
2
votes
1 answer

Symfony2:BBCode presentation and insertion

i am working on a project...with many database content in BBCode (Forum posts...etc). is there a bundle or solution to present that "out of the box" without me having to invent wheel in Symfony?
Confidence
  • 2,283
  • 3
  • 33
  • 57
2
votes
3 answers

preg_replace_all() related issue

I am currently making a BBCode class for my website. I need to do the following. function bbCode([skill]Q[/skill]_________[skill]Q[/skill]_________[skill]Q[/skill]); bbCode function has to replace all Q's between [skill] and [/skill] tags, and…
Aristona
  • 8,611
  • 9
  • 54
  • 80
2
votes
4 answers

Parse multiline BBCode with C# Regex

I'm working on a C# class to parse BBCodes out of text pulled from a database for PHPBB posts. On the PHPBB there is a custom BBCode added which looks like this: [deck={TEXT1}]{TEXT2}[/deck] Which, sitting in the database, looks like…
BRW
  • 354
  • 3
  • 18
2
votes
2 answers

Inserting iframe into mysql db

I am using codeigniter and at the moment I have a bit of the problem. When I insert iframe (from the youtube) into db in the view file I get row code like this: