Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

BBCode where are you?

dfoxxdfoxx New
edited June 2010 in Vanilla 2.0 - 2.8
how is bbcode enabled/disabled? does it even still exist in 2rc2? class.format.php says it does... help me!

Comments

  • Options
    does no one know what i'm talking about? buried
  • Options
    edited June 2010
    There are helper functions in Gdn_Format to implement certain types of markup languages but as far as I can tell there are no hooks available to intercept the rendering of comments/conversations/etc. That being said, it looks like we'll have to wait on the Vanilla developers to make time for this extremely essential feature.
  • Options
    there are several bbcodes built in, but i can't tell if it's something to do with the htmlformatter that's messing things up... it worked once for me as i was messing around and i bolded some text, aside from that it hasn't worked.

    $Mixed2 = preg_replace("#\[b\](.*?)\[/b\]#si",'\\1',$Mixed2);
  • Options
    Basically it's a very quick 'n dirty implementation of BBCode using regular expressions. I would highly suggest avoiding its use like the plague given the potential security flaws.

    Just wait for the developers.
  • Options
    @Irwin, what kind of security flaws? I sucessfully implemented a generic BBCode parser (easy smiley adding included :D) via an addon.
  • Options
    @Dykam, the actual implementation in Gdn_Format is rather "sloppy" & does very little checking creating an attack vector. Also, regular expressions should not be used to parse a ML.
  • Options
    Yeah, I know about the limits, but currently it is working well enough and I can easily change the implementation. Also I'm not using Gdn_Format in any way.
  • Options
    TiGRTiGR
    edited June 2010
    @dfoxx you can enable bbcodes in config.php, just add

    $Configuration['Garden']['InputFormatter'] = 'BBCode';

    However, I personally prefer Markdown.
  • Options
    edited July 2010
    re BBCode in RC3 , have been testing and found that

    [url]http://example.org[/url]

    doesnt work, but

    [url=http://example.com]Example[/url]

    does work

    Anyone know anything about this

    also , is there any documentation about the defaults markup in vanilla ?

    cheers

    justin
  • Options
    By default it's just html with automated linkifying.
  • Options
    @TiGR thank you!

    it seems like it isn't exactly polished though... very glitchy.

    also just a note, if you enable bbcodes in the config, as mentioned above, it doesn't apply retroactively... so you might have to twiddle with the format value for each post.
  • Options
    to each their own, but why anyone would want to use bbcode in comparison to even just the plane html defaulted, or a wysiwyg plugin blows my mind.
  • Options
    ToddTodd Chief Product Officer Vanilla Staff
    Our BBCode implementation is pretty simple I know. If anyone knows of an open source BBCode parser out there I'd love to know.
  • Options
    Very first hit on google..

    http://nbbc.sourceforge.net/

    BSD Open source licence.
Sign In or Register to comment.