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.

Changing all BBcode into HTML before migration from phpBB

candymancandyman ✭✭
edited November 2011 in Vanilla 2.0 - 2.8
As you know :P I'm trying to migrate from phpBB to Vanilla2 from months...
Unfortunately, as I need a clean migration without any tricks, routes and so on, I've found some problems quite difficult to solve.

The first is about the translations of internal URLs: but it's another story.

The second is about the possibility to add a rule to the vanilla2exporter to translate al previous posts contents from BBcode (native phpBB markup language) to HTML (native Vanilla2) in order to have the same markup language for all the posts and not a AV (ante Vanilla) era and a PV one...

Someone have managed to to this?

For example I have to change

[b]text[/b]

into

<b>text</b>

and

[url]address[/url]

<a href="http://www.mysite.it">address</a>

and so on...

Are there any companies out there which can do the job for me?

Thanks in advance.

Best Answer

  • ToddTodd Vanilla Staff
    Answer ✓
    Your forum will format all new posts according to the following configuration setting:
    $Configuration['Garden']['InputFormatter'] = 'BBCode'; // Use Html, BBCode, Markdown, etc.

Answers

  • I wouldn't bother. Is it such an issue?

    grep is your friend.

  • No, it's not a bug of the Vanilla forum software at all.
    I'm just asking if someone has solved this in the past.
    It would be a nice plus for the Porter too.
    I don't like to have half forum posts formatted with BBcode and half with HTML.
    Try to think to another migration in the future: issues will be for sure.
  • x00x00 MVP
    edited November 2011
    it is a case of parsing it with a bbcode parser. But seriously bbcode is not standardised. You expect them to pack every single parser, of every forum or implement a do all parser?

    This is possible, but porters are supposed to port. Parsing is a different matter. It carries an overhead. I mean if you have load of record it is a waste of time.

    Sure it is possible. Is it worth it?

    Candy conversion always has some pitfalls, precisely becuase forum software is not the same. If it was the same there would be no reason to switch. These are a lot of old threads. New content will dominate.

    if your users love bbcode, then perhaps you should stick with bbcode. Otherwise they won't miss it.

    If you really want to try and convert I could maybe help you out for money, obviously I would need the file, but I will respect privacy of your users.

    grep is your friend.

  • Thank you very much for the reply.
    Unfortunately I need this.

    I've found the parser: I didn't know about it.
    This, added to the Porter, should work according to you?
    if your users love bbcode, then perhaps you should stick with bbcode. Otherwise they won't miss it.
    I though about HTML 'cause it seems to be the standard for the ultimate generation forums software but even BBcode should be OK. But can I force Vanilla and the Button Bar plugin to markup with BBcode? The goal is simple: the same standard of text formatting for all the posts (pre and post migration).
    If you really want to try and convert I could maybe help you out for money, obviously I would need the file, but I will respect privacy of your users.
    I keep this in mind.
  • x00x00 MVP
    edited November 2011
    that is a parser, not the parser. the bbcode used, is much more extensive than that.

    to be honest I only need some test data, I could probably rustle some up. It is a question of if you want to execute the conversion yourself.

    grep is your friend.

  • candymancandyman ✭✭
    edited November 2011
    I would paypall the code to add to the porter.
    Maybe it's better to have a look at the bbcode used in the posts.
    I remember somethink like this...

    [b][i][size=24]Ciao![/size][/i][/b]

    and that...

    [quote="candyman, in [url=http://mysite.it/forum/post]another thread[/url]"quoted post[/quote]

    Anyway the 80% are bold and italic issues, very simple, the rest are URLs.
  • x00x00 MVP
    edited November 2011
    I'm willing to do this for you and convert your links to vanilla links.

    You sponsor me the code will be released open source.

    grep is your friend.

  • candymancandyman ✭✭
    edited November 2011
    It could be a solution depending by the cost...
    Anyway I prefer ask my community about to migrate from BBcode to HTML.
    I noticed that Spoilers Plugin uses a style like bbcode

    ...


    is it possible to force Vanilla to use BBcode? I think that the Button Bar could be converted too, couldn't it?

    Anyway the URLs conversion is needed.
    I'l try by myself after upgrading to PHP5 and then I'll contact you.
    Thanks in advance.
  • well if you are interested PM me.

    grep is your friend.

  • Found NBBC.
  • Strange behaviour: I've imported my old phpBB forums formatted with BBcode into a fresh Vanilla2 without changing the parser to BBcode.
    The imported post formatted with BBcode are correctly displayed.
    The brand new post written with BBcode are not correctly displayed (they need HTML).
    I can't explain this to me.
  • ToddTodd Vanilla Staff
    Answer ✓
    Your forum will format all new posts according to the following configuration setting:
    $Configuration['Garden']['InputFormatter'] = 'BBCode'; // Use Html, BBCode, Markdown, etc.
  • I understand, but I can't explain why old posts are now correctly displayed.
    They should not work too before I change the configuration that you provide me...
  • you misunderstand. That is the default formatter. Old pest are parsed according to their formatter column, if you change the default formatter that will still be the case.

    grep is your friend.

  • I don't want to bother you but I don't understand.
    I try to explain better.

    I've installed Vanilla2 without changin' anything: so the InputFormatter is the default HTML.
    Despite this, the imported posts from an old phpBB2 forum (with default BBcode format) are displayed correctly.
    If I post new post using BBcode, these are not correctly displayed.
    I expect this but I don't understand why the imported ones (in BBcode format too) are correctly displayed?!?

    Maybe every post "reminds" is original markup language and Vanilla2 understand this?

    So, and we return to the title how his thread, waht happens if I change all the post from BBcode to HTML (with a parser) befeore importing them in Vanilla2?
    Will them correctly displayed despite them were originally formatted with BBcode?

    Thanks in advance.
  • I just explained, they are imported as bbcode, therefore in the format column for those records it will be bbcode.

    it is not really hard to detect bbcode anyway.

    grep is your friend.

  • candymancandyman ✭✭
    edited November 2011
    So if I change them (from [ b ] to < b > for example) in the sql file before loading it in Vanilla they will be imported as HTML, right?
  • Nah there will be an equivalent format column in phpBB

    grep is your friend.

Sign In or Register to comment.