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
2 answers

Onclick, php echo

okay this is just so messed up to me i don't understand why, its doing this My Onclick code is this quote my…
-2
votes
2 answers

Use of multiple regular parentheses to parse bbcode

I'm trying to use regex to parse bbcode, so far I could make this regex working fine if re.search("(\[b\])", m, re.IGNORECASE): r = re.compile(r"\[b\](?P.*?)\[\/b\]", re.IGNORECASE) m = r.sub(r'\1', m) But on this case where I…
Daniel Hyuuga
  • 446
  • 1
  • 5
  • 13
-2
votes
1 answer

PHP BBcode parsing

Possible Duplicate: How to convert HTML to BBCode how can i parse to [tag=y] [/tag] Without using extensions ...
net-User
  • 25
  • 6
-2
votes
2 answers

make exception for BBCodes when use htmlspecialchars

i used htmlspecialchars to clean site comments, it's change <> to html special character. but i also need to put some links in comments, same like as here at SO. i think some thing like perg_replace can make a exception for htmlspecialchars, for…
Vahid
  • 382
  • 1
  • 6
  • 19
-2
votes
3 answers

How can I make this BBcode? [HTML to PHP]

Possible Duplicate: php regex to Inside my admin panel I have a textarea where staff can insert messages to customers. I want to convert and detect [[p=304_red]] to two matches within a return. I was thinking str_replace but I cannot do…
TheBlackBenzKid
  • 26,324
  • 41
  • 139
  • 209
-2
votes
2 answers

How to make PHP BB Codes with RegExp?

for my website, I want a simple BB code system. Nothing special--just hyperlinks and images will be fine for now. I'm not good with RegExp. Period. But if someone could show me an example, I may be able to grasp it to clone it into different…
RickyAYoder
  • 963
  • 1
  • 13
  • 29
-3
votes
3 answers

How to convert

I have an html string $html = '
Some Text
I have amount > 1000 USD'; I want to convert it to this $html = '[div style="background-color:#000;border:1px solid…
Munib
  • 3,533
  • 9
  • 29
  • 37
-3
votes
1 answer

Best way to turn this list bbcode to html?

Say have have a bbcode list done like this: [list] [*]something [*]something2 [/list] What would be the best way in php to turn that into a html list?
NaughtySquid
  • 1,947
  • 3
  • 29
  • 44
-4
votes
1 answer

PHP String Replace for BBCode

I want to make a custom BBCode for my forum site, but I've run into an issue, and I'm having a hard time fixing it. This is what's in the database for the body of the thread "[b]Bold[/b][i]Italic[/i][strike]Strike[/strike]". However the output is…
UnderMyWheel
  • 241
  • 2
  • 11
-5
votes
1 answer

asp classic replace
in section of output BBCode

I have create a demo file, that you can download, and a page to see it running. What I need to have done, is that all the tags, need to be removed ONLY in the area (BBCode [code]) UPDATE: The code does not work with multiple BBCode tags. So if…
Wayne Barron
  • 304
  • 4
  • 16
1 2 3
40
41