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.

BBCodeParser

24

Comments

  • D'OH! I should edit that out. That's a wish list item of mine and requires an unholy butload of work - so I'm not sure if it will happen :/
  • @Stash How much is done with BBCodeParser 1.0.3 ? Found an old thread of mine where I asked how to set BB code as default instead of text, saw your comment @ Changing default Format comments as setting # 7
  • Version number changed from 1.0.2 to 1.0.3.
  • Uploaded version 1.0.3 of BBCodeParser.
  • See if that works for you ;)
  • Okay, seems to break! I'm using BB Insert bar 0.1.9 , when putting text to bold I get " undefinedbundefinedtestundefined/bundefined " instead of [b]test[/b] when I set $Context->Session->User->Preferences['ShowFormatSelector'] = 1; // to 0 .

    If it's set to 1 then seems to work ok.
  • Hmm, bugger :/ This probably has something to do with the way BBInsertBar checks to see which formatter is active. I wonder if there's another way for it to check?
  • Very nice extension, I just got it working on my forum. :)

    3 things:
    I had my host install pear on my website, which is 1.8 MB worth of files. Since BBCodeParser uses pear, is the difference in bandwidth usage between BBCodeParser and say.. BetterBBCode very big?

    Is there any way I can get BBCodeParser to convert new lines to <br>s without having to use the AutoP extension? AutoP adds <p>s everywhere, even in quotes, which - in my opinion - adds too much white space to the quotes. Is there a way to modify the BBCodeParser code so that it adds just a simple <br> tag for every new line?

    It would also be nice if BBCode tags inside the [code] tag weren't "converted". This would be extremely useful when you'd want to explain how to use BBCode tags on a forum which uses only BBCode.
  • I haven't checked, but since PEAR isn't actually downloaded by the client (it's all server based) I would imagine that BBCodeParser and BetterBBCode use the same amount of bandwidth.

    I've been meaning to fix a few things in AutoP (like disabling it in CODE and PRE), but again, time constraints. Could you expand on your Ps in quotes? what exactly is the problem there? I'm sure there's a way to add BRs everywhere, only I'm not sure how. I'm also more interested in getting AutoP working 100%, so unless someone wants to add this functionality as a switch that can be turned on and off, I can't see myself adding it.

    Your last request is one I've thought about quite a bit myself and come to the conclusion that it doesn't make sense. I understand what you're trying to achieve, but the [code] tag basically can't do it. We'd need to create a new tag like [bbcode] or something, otherwise, what do you do when you have a nested [code] tag in your code example?
  • The problem I'm having with AutoP is that it adds <p> around the content of a quote like this:
    (Don't pay attention to the content of the quotes, I had to quote something.. ;))
    http://www.vanslageren.nl/marleen/images/quotes1.jpg

    Without those extra <p>s it looks like this:
    http://www.vanslageren.nl/marleen/images/quotes2.jpg

    So what I meant, is that the added <p>s add extra white space to the top and bottom of the [quote] block, which I don't really like. It's not really a big problem, but wouldn't it be easier to not have to install another extension to fix the new lines? I know there's a function in php called nl2br() which converts new lines to breaks, maybe that could be of some help?

    Your [bbcode] tag idea sounds good, but if you were to implement that, what would be the use of the [code] tag? Wouldn't it just be similar to the [quote] tag then?
  • I've responded to this in the AutoP thread as it doesn't have anything further to do with BBCodeParser

    (AutoP # 7)
  • Uploaded version 1.0.4 of BBCodeParser.
  • Thank you for this extension. I encountered a problem earlier on, when trying to post URLs for the Amazon Associates programme. It seemed that the bit of the code that looks for bare URLs (i.e. those not marked up within [url][/url] tags) was spotting the "www" within the link, and that broke things. I bypassed the first regexp (line 109 of Links.php), which meant that it wouldn't, erm, autolinkify any more, but that it didn't break the links to Amazon. If I'm suggesting anything, it's to selectively switch off the first regexp preg_replace() when within a [url] block. I'm fairly sure that would still have it behaving as-expected. Cheers. PS Also, the [list] tag is giving me numerically ordered lists, even though I started the block with a plain [list], not a [list=1]. I'm using Vanilla 1.1.2 and BBCode 1.0.4.
  • http://exhibitq.com/talk/discussion/2/#Comment_34 <-- I've come across the Amazon problem before. My problem here is that I don't have the requisite PHP knowledge to fix it and I don't have the time to learn it currently. If you could provide a fix (as I don't want to lose the autolinking ability) then that would be excellent and I'll add it ASAP :) I think it's got something to do with the URL encoded URL, but I have no idea of how to support this. Hmm, regarding the [list] tag producing an ordered list, since everyone else other than the PEAR module seems to produce an unordered list instead, I shall have a look at changing that.
  • Big problem, seems like there is no paragraphs when using BBcode option!!!! (using BBinsertbar)
    *ahem*
    Can't believe I didn't see it before, but seems like with text you get the spacing:

    e.g

    but with BBcode it's like this : e.g.


    The solution is to install AutoP extension...
  • Good job, just got it installed, works great!
  • Okay, is there any way to add a Thickbox BBCode with this?

    I was thinking something like this:

    [thickbox=IMAGE URL]THUMBNAIL OR TEXT[/thickbox]
  • why this addon dont like my ENTER button? it does not do breaks (paragraphs)
  • BBCodeParser # 14
    BBCodeParser # 20
    BBCodeParser # 36

    Thanks for all the feedback everyone else. I do plan on pushing this forward again some time in the not-to-distant future. The first child is the tough one apparently ;) Of course, if anyone wants to make changes to this and email them to me, I'd be more than happy to include them in the release - I just don't have time to make them myself right now. It's still the best BBCode extension for Vanilla at the moment anyway though :P
  • With some posts I put in typographically correct glyphs such as:

    & #8211; for the n-dash ( – )
    & #8212; for the m-dash ( — )

    (but with no space between the & and #, here it renders them correctly in text or html formats...)

    It worked before with BetterBBCode, but BBCodeParser is letting them all hang out. :(

    What should I add to fix that?
Sign In or Register to comment.