PhpBB2 bbcode_uid Import Issue...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pr0sthetic
    New Member
    • Jan 2008
    • 4
    • 3.6.x

    PhpBB2 bbcode_uid Import Issue...

    Hi!

    Thanks in advance for any help offered with the issue I am experiencing. As requested, here is the necessary information:

    * Type of import (clean or merge): Clean install.
    * Source board system and version: PHPBB 2.0.17
    * Target version: vBulletin 3.6.8 Patch Level 2
    * Module issue occurred on: N/A
    * Any SQL error reported: N/A

    I have been searching the forum, internet and anywhere that has any information semi-related and am at a loss at this point as to how to fix and/or prevent the issue I am experiencing from occurring. Every time I use Impex to import my PHPBB 2 forum, when it imports the posts themselves, the "bbcode_uid" field from the original phpbb 2 database, which is a series of 10 alphanumeric characters seems to show up in the bbcode that carries over, disrupting many of my tags from rendering properly.

    For example:

    [b ]example[/ b] is actually [b:1e4e63b9f6]example[/b:1e4e63b9f6] as there is a bbcode_uid (unique identifier?)

    It doesn't seem to have happened to all bbcodes, but a very large majority of them are impacted by this. I have confirmed the [b], [i],[siteimg],[color=] - though there may be more.

    At this point, I guess I have a few questions as I have spent hours trying to correct this:

    A) Is this normal for a phpBB 2 import to occur? I have read online that the manner in which it appears to have stored BB Codes in the database for my previous forum is normal, though this is causing issues from me being able to develop customer bbcodes in the admin panel that will identify the codes to replace in each of the posts and have been unable to locate specific information or posts regarding this in this forum. So in essence, the majority of my prior forum's posts should they have any bit of bbcode in them, will render as the example provided above, causing me to be unable to even develop a custom bb tag, to render them differently.

    B) Short of creating another back-up, opening up the .sql file in a program such as word edit pro and attempting to perform (a large number of) regex searches for the various bbcode issues that are stored from phpbb2, is there an easier and/or faster way to accomplish this?

    I have never used regex expressions so today has been quite a learning experience, to which I can't manage to get them to work in mySQL which is why I am running them in a text editor. I just want to get to modifying the templates and design, but don't want to get that far until I am comfortable with getting the data (important part!) of my previous forum properly imported.

    Any help or Insite on this issue would be unbelievably appreciated!!!

    Thanks in advance, again!

    /Pr0s.
  • pr0sthetic
    New Member
    • Jan 2008
    • 4
    • 3.6.x

    #2
    Idea..

    Now that I think about it...

    If anyone reading this is more advanced in terms of php/mySQL than myself, I think it would be possible to write a script that pulls the contents from the phpbb_posts_text table and matches the bbcode_uid field with the contents of the post_text and if found, replaces it with nothing? Would anyone be able to assist in writing this? I currently am working on it all locally as my host was unable to run the scripts without timing out. Unless of course this is all due to something I am not doing correctly in the conversion process itself, which would be ideal at this point!!

    Sorry for the double post, but was an after thought.

    Thanks again,
    /Pr0s.

    Comment

    • pr0sthetic
      New Member
      • Jan 2008
      • 4
      • 3.6.x

      #3
      Ok...

      So I wrote my first php script in about 4 years. I will post it if anyone should run into the same issue as myself. I'm sure it could be more efficient, but... I did with what I could figure out as quickly as I could. The need for mysql_real_escape_string() got me good, and took me 2 hours to figure out. I thought I did good, considering I didn't know much of it. Use at your own risk.

      PHP Code:
      code removed 
      Last edited by Jerry; Mon 28 Jan '08, 12:58pm. Reason: removing code

      Comment

      • pr0sthetic
        New Member
        • Jan 2008
        • 4
        • 3.6.x

        #4
        Or...

        You can use the cleaner.php that I found out about after doing this. LOL.

        Comment

        • Jerry
          Senior Member
          • Dec 2002
          • 9137
          • 1.1.x

          #5
          ImpEx matches and takes out the vast majority of the bbcode using a regex to match the tags, if some get though it can be for some nesting reasons in quoted posts or that the parser missed them, all the code that deals with it is in:

          impex/systems/phpBB2/000.php phpbb_html()

          The regexs from there can be used in cleaner.php if the posts need another pass to clean out the HTML.

          Though if there are basic tags that were missed, posting the phpBB source here could help as I could double check that the parser can get them.
          I wrote ImpEx.

          Blog | Me

          Comment

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