Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

The Better BBCode Extension

edited January 2007 in Vanilla 1.0 Help
Link

I was having some problems with the BBCode extension that came with Vanilla, and I've been meaning to make an extension out of the Pear BBCode engine for a while, so I finally broke down and did it. It should be virtually immune to HTML/JS insertion attacks, and doesn't choke on nested tags or improper markup as much as the old one. This was a big deal for me, since the Quotations extension needs tags to nest properly.

Installation should be as easy as dropping it in your Extensions folder, enabling it, and turning the old BBCode extension off.
«13

Comments

  • show me show me show me!!!


    ;) is this going to be for quotations or just bbcode in general?
  • Both.
  • I get this when trying to install it with V1 Warning: main() [function.main]: open_basedir restriction in effect. File(/BBCodeParser.php) is not within the allowed path(s): (/home/web/web73138:/var/tmp:/usr/local/lib/php) in /usr/home/web/web73138/forum/extensions/BetterBBCode/default.php on line 11 Warning: main(BBCodeParser.php) [function.main]: failed to open stream: Operation not permitted in /usr/home/web/web73138/forum/extensions/BetterBBCode/default.php on line 11 Fatal error: main() [function.require]: Failed opening required 'BBCodeParser.php' (include_path='.:') in /usr/home/web/web73138/forum/extensions/BetterBBCode/default.php on line 11 :(
  • edited May 2006
    Jens: you running it on an external host or on your own computer?

    EDIT: Nevermind, just change

    require_once('BBCodeParser.php');

    to

    require_once($Configuration["EXTENSIONS_PATH"].'/BetterBBCode/BBCodeParser.php');

    That should fix it.
  • Thanks Bergamot, I'll check it out!
  • The problem is that, when PHP is set up to only allow includes from certain folders, it apparently refuses to allow relative paths, even if the relative path would have resolved to a valid path.

    Sometime soon I'll have the time to change the official copy.
  • I got it working, cheers !
  • blizeHblizeH ✭✭
    Bergamot how do I use lists on the better BBCode extension? They don't seem to function correctly ;(
  • I think it is like this:
    [list]
    [*]test
    [*]test2
    [/list]
  • blizeHblizeH ✭✭
    Nup, isn't working properly :(
  • yeah, blizeH. for me it's not working, too.
  • You're right, the only thing, that works for me is: [list=1][*]test[/list] but if I add another [*] it doesn't work
  • Aww crud.
  • Hmm, at the moment, it looks like [list][li]listitem[/li][li]listitem[/li][/list] works best.
  • I just upgraded to the newes V1 release. I have the BBcode extensions installed, yet the editot isn't showing up in the discussions pages... What's up? my forum is here : http://www.huge-entity.com/forum (still tweaking layout)
  • WHat do you mean by it is not showing up. Do you mean that you don't have a new option in the comment form?
  • Sorry, it seems to have appeared on its own. Delayed extension... I dunno
  • Well that's good to know :D
  • edited June 2006
    After a bit of messing around I have found a new problem. The editor duplicates everything! That is, if I press the URL button, add my url and the text, when the editor adds it to my comments it also adds a complete duplicate of the entire text so far... Weird. Any ideas as to what is causing this?
  • For the record, there's a few flavors of what could be called "bbcode", guys. The way Bergamot is implimenting it based on the pear classes is pretty much straight forward excessivly stupified html with the angled brackets replaced with the square ones, this way code can be identified and filtered. What you know as: [list] [*]item 1 [/list] While it's still "bbcode" it's more of a shorthand bbcode which is just bb's equivalent to markdown. Bergie, I'm not too much of a pear user, but this causes the server to fetch the appropriate libraries from pear to make this work, right? Or does the user need to do it all manually?
This discussion has been closed.