Announcement

Collapse
No announcement yet.

Importing from dotNetBB: "code" BB tags trashed the text enclosed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Importing from dotNetBB: "code" BB tags trashed the text enclosed

    I got my dotNetBB forum imported, but posts that used the BB code tag are pretty close to illegible. I know that Cleaner.php is supposed to be able to fix things after the fact, but all the spaces were removed.

    For example, one post had this text enclosed in BB code tags (yes in this case he should have used quote tags I know):
    If the registry server crashes, then nobody can play the game. If this is a concern then you can run two parallel ES4s (requiring a second license of course)
    What is in the database after import is this, with a BB quote tag in front, but an HTML end code tag at the end. Note that all the spaces have been removed.
    Iftheregistryservercrashes,thennobodycanplaythegame.Ift
    hisisaconcernthenyoucanruntwoparallelES4s(requiringasecondlicenseofcourse)
    I'm going to assume that the only reasonable way to handle this is to either tweak the dotNetBB module of ImpEx or else run a few SQL commands on the source database before import. I'm willing to do either one but need to know what to replace the existing "code" BB tags with so that ImpEx behaves correctly, or else what part of the dotNetBB module I need to look at.

    Since this is a forum for software developers, we have a large number of posts that used code BB tags, including quite a few made by me personally answering questions and giving source code snippets. I need a solution to this problem that does not involve manual copy and pasting of each of the broken posts from the old forum.

    I'm still trying to find a post in the old forum that used QUOTE tags instead of code tags so I can see what ImpEx did with that.

    edit: QUOTE tags work almost correctly. The original "So-and-so said" that was displayed before the quote is converted to "So-and-so said said..." . I think we can live with the extra said, or use Cleaner.php to replace "said said" with "said".
    Last edited by tcarr9; Fri 26th Feb '10, 10:51am. Reason: found a quote in old forum
    Teresa Carrigan
    Lead Java Game Developer
    Electrotank

  • #2
    Solution found!

    1. Open this file: impex/systems/dotnetBB/000.php
    2. Find this line:
    Code:
    CAST([MessageText] as TEXT) as body,
    3. Replace with this line:
    Code:
    CAST([EditableText] as TEXT) as body,
    4. Save file and run ImpEx as usual.

    Using this fixed all the code tag problems without breaking anything so far as I can see. The EditableText field is the one that users see when they edit the post. dotNetBB then translates that into HTML and stores it in the MessageText field.
    Teresa Carrigan
    Lead Java Game Developer
    Electrotank

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X