corzblog bbcode parser preview



Here it is! My [search engine fodder] bbcode to html parser, and html to bbcode parser [/search engine fodder]!

This is the actual very onsite parser that parses the bbcode of my blogs and site comments, which as well its usual tasks of, well, you know, the parsing stuff, also moonlights doing a cute wee background demo of itself, you're looking at it. it knew you wanted to do that. hit the "preview" button to see at least one half of the parser's bbcode to html/html to bbcode functionality.

The front-end (below) is built-in to the parser, you just call the function and it creates the form. The cool, super-portable JavaScript bbcode buttons and functions come in the package, too. Have fun. Oh, and by the way, output is 100% pure HTML5, or nice plain bbcode, which ever way you look at it, it's free.

button to undo the last javascript change
cbparser quick bbcode guide..
Most common bbtags are supported, and with cbparser's InfiniTags™ you can pretty much just make up tags as you go along. If cbparser can construct valid html tags out of them, it will. Experimentation is the key, and preview often.

A few bbcode examples..
[b]bold[/b], [i]italic[/i], [big]big[/big], [sm]small[/sm], [img]http://foo.com/image.png[/img], [code]code[/code],[code]teletype[/code], [url="http://foo.com" title="foo!"]foo U![/url], and more.. To post code with indentation and/or strange characters, .htaccess, etc., use [pre][/pre] tags.
download cbparser
an HTML5 compliant bbcode parser



Welcome to the comments facility!


previous comments (eight pages)   show all comments

adam - 11.05.05 9:32 pm

uh, crap.. you'll have to view source to see what i mean. i shoulda known better.


cor - 12.05.05 12:39 pm

adam, I haven't a clue what you're talking about! smiley for :blank:

;o)
(or


adam - 12.05.05 3:16 pm

hm, when i post in phpbb and insert a bbcode tag, then re-retrieve it manually from the database, the bbcode tags contain a semicolon and some id after it. i just tested this on phpbb 2.0.15. is this supposed to work with phpbb? it looks like it should...


cor - 12.05.05 10:23 pm

Doesn't phpbb have bbcode built in? smiley for :eek: No, I'm certain it does. So I've never considered phpbb compatability, what would be the point?

I mean, there may be one, but I'm slow tonight, you'll need to prod me!

;o)
(or


adam - 13.05.05 7:03 pm

i am drawing the text directly out of the phpbb database and displaying it on a seperate webpage. since phpbb uses only a small set of bbcode tags, i'm just going to write my own parser for now to handle those tags with these weird id's in them.


cor - 14.05.05 9:12 am

r8! with ya!

I hadn't really thought about phpbb's bbcode set being small, I just presumed I'd gotten carried away! I'm fairly sure it wouldn't be difficult to incorporate the id's into cbparser. good luck!

;o)
(or


Mike - 17.05.05 11:18 pm

Did anyone manage to get a version working which removed the bbcode id valies (eg: thing )?


adam - 18.05.05 3:25 pm

yeah, i wrote my own... a much smaller and less feature rich parser than cbparser. since phpbb uses only a small subset of the bbcode tags, i wrote something that mostly uses regex string replacement to handle just those... for now it's only handling the most basic tags (i, b, u, img, url). i'm not sure if this is going out of the scope of the cbparser discussion, but the code is very simple... i could post something here or e-mail it to you....


cor - 18.05.05 5:24 pm

Feel free to mail it to me, or throw it right here; lots of folks looking for parsers pass through here every day, someone will doubtless find it useful.

I've seen some interesting wee parsers on my travels around the net, most small and clever (like the "taglet" parser) but with serious style limitations. My "big dumb parser" approach works really well for all my needs, and is infinitely expandable! but there's definitely situations where a tighter ball of code would be more suited.

Yeah, bring it on!

;o)
(or


Mike - 18.05.05 10:12 pm

As I couldn't find one anywhere I wrote a bit to strip out the pesky uid from phpbb so the parser will work, although I have now written my own now as I was then halfway there, thought I would add the code here incase anyoine else needs to use it.


heh, unfortunately the parser here won't let me post it as it has unbalanced tags :) so you can fetch it from here

Good luck to anyone else.


cor - 19.05.05 6:54 am

that's what the pre tags are for! smiley for :lol:

;o)
(or


next comments (12 pages)

First, confirm that you are human by entering the code you see..

(if you find the code difficult to decipher, click it for a new one!)


gd verification image

 

Welcome to corz.org!

I'm always messing around with the back-end.. See a bug? Wait a minute and try again. Still see a bug? Mail Me!