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

13

Comments

  • That's a good question. Strictly speaking that's HTML and not BBCode, so a BBCode parser shouldn't, by default, actually parse those. It might be an idea to allow HTML glyphs and the like in a BBCode Parser. A simple string replacement for – in the default.php should hack in support, but I'll have a think about adding this in as a module to the parser as I rather like the idea of being able to use glyphs...
  • But, but... — they display in Text format. Edit: it worked. See?
  • IMO, it shouldn't work in text format, but that's an entirely different discussion...

    The reason it's not working is that the BBCodeParser — quite correctly, since it doesn't know about entities — is converting the & to &

    In code this looks like:&
    Hope that helps.

    Here's a test case on my test forum --> http://exhibitq.com/talk/discussion/2/bbcode-test/#Comment_41
  • Hi, I have 2 showstopper problems with BBCodeParser : - it only seems to work for logged in users! When logging out and viewing the same page, it appears exactly as if the extension is disabled. Any idea ? - Quotes don't work anymore when BBCodeParser is enabled. Here's how it looks before : <p><quote><span class="quotemeta">"username" wrote: </span>blablabla<br /></quote></p> and with BBCodeParser: <blockquote><p>blablabla Any ideas?
  • A third problem I didn't mention : I did a quick test and it looks like nested quotes don't work. Can someone confirm this ?
  • <p><quote><span class="quotemeta">"username" wrote: </span>blablabla<br /></quote></p>

    ^ this is HTML... that would be the reason it doesn't work, try using [quote][/quote] then it should work, complete with nesting...
  • sorry for the late reply ... No, when I said "before" I meant :as parsed by Vanilla before enabling BBCodeparser. The original comment uses [quote][/quote], of course. Any idea for the "logged in" problem ? thanks
  • Has anybody seen this ?
  • I've seen it, but I've not had a chance to look at it yet. As I've said before, if anyone wants to post a fix I'll get it put into a new version, but I just don't have enough time to fix this right at the moment. I will have some more time in the new year.
  • Hi there and happy new year !! Stash, if you don't have the time to give it a look, could you give me a few hints for where to look at, I'll try and understand what's happening. Unfortunately I don't have a clear picture yet of how Vanilla works and at what stage extensions kick in... :( thanks!
  • Hello, Ok, I think have a better understanding of the problem now: It looks like, if the FormatType column is empty for the comment, BBCodeParser still decides to kick in and parse it if you ARE logged in, but ignores it if you are not. I noticed this because it behaved differently with my phpBB-imported comments (which lacked the FormatType info), and new comments made inside Vanilla (FormatType=BBCode)
  • Thanks for this reno, as soon as I get a spare 30 mins I'll see about getting this fixed!
  • Hey there,

    Is there any reason this extension sets the logged-in user's FormatType to BBCode rather than accepting the value the user already has set in the database? It also looks like it's setting the DEFAULT_FORMAT_TYPE config variable, overwriting the value I had set in conf/settings.php.

    What gives?
  • By default it defaults to making itself the default (crappy sentence...). Try commenting out lines 46 and 47 in default.php, just put // at the beginning of each line. Let me know if that works.
  • No, I know. They've already been commented out. I just feel that making the assumption that the user would be ok with this (without any obvious knobs or mention of this in the README, which is oddly titled "Readme, BBCodeParser.html") is wrong. Just an opinion.
  • Whenever I have this enabled, there doesn't seem to be any line breaks in my comments. Whenever I make new paragraphs in my comments, they don't register once it is posted, everything is just together in one giant paragraph. How can I fix this?
  • there is a "auto p" extension, download and install this and paragraphs will work :)
  • I'm having some difficulties:

    Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in /srv/www/vhosts/multistrefa.info/httpdocs/forum/extensions/BBCodeParser/BBCodeParser.php on line 25 Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='.:.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/vhosts/multistrefa.info/httpdocs/forum/extensions/BBCodeParser/BBCodeParser.php on line 25

    My web host claims that PEAR is enabled.
  • Heh, time to show my lack of knowledge of anything :D...

    Anyway, line 25 in BBCodeParser.php is as follows:require_once 'PEAR.php';
    And from the look of the second error you've posted I'd say that your host hasn't setup PEAR to be a shell path (heck I can't even remember if this is the correct terminology any more - baby's rotted my mind!). Perhaps someone else with a decent knowledge of server stuff could jump in on this one as I'm flying without a parachute... is there a better way to set this up in the BBCodeParser?

    I've not come across anyone else with this issue, so I'm hoping (for my sake) that this is a strange server setup or an error on their part! If so, they're far better qualified to fix it than I am if it's an error of the extension!

    Hope this helps even slightly.
  • Issue resolved. Some modifications from the host's side helped.
Sign In or Register to comment.