OpenImporter / openimporter

Development workspace for the open Importer engine.
BSD 3-Clause "New" or "Revised" License
20 stars 14 forks source link

Importer for Invision's IPB/IPS software #95

Open KeiroD opened 8 years ago

KeiroD commented 8 years ago

This is a feature request for the IPB software to create an importer for.

I think I might be able to get you guys access to the software to try creating an importer for. Let me know what you guys need and I'll see if I can make it happen.

kode54 commented 8 years ago

I, too, would like to see this. I have access to a 15 year backlog on IPB 2.x, which dates back to an initial import from vBulletin, I think.

emanuele45 commented 8 years ago

Yep, yep, have access to a database is the first and "must have" step in order to start building an importer! If you have a way to give access to the database feel free to drop me an email at emanuele45 at gmail.com

KeiroD commented 8 years ago

Got it.

We'll provide a copy of a 3.x install. We don't have a 2.x install on hand, but I think @kode54 might be able to help you out with that.

emanuele45 commented 8 years ago

An IPB 3.4 converter should be already available in the development branch, I used it to convert a forum, so it should work, but improvements can always be applied. ;D

KeiroD commented 8 years ago

@emanuele45 Sounds like you don't have an importer for the 2.x branch, then?

Welp... looks like I need to entice a 2.x license-holder to cough up a copy.

kode54 commented 8 years ago

Database link emailed, please tell me where I may securely send the password.

E: Forum software link emailed too, same password.

kode54 commented 8 years ago

Here, have a mostly finalized SMF importer SQL file:

https://gist.github.com/kode54/8a296da37c23391d020c

You can check the revision list to compare what I changed versus the original script that was attached on the topic at SMF's forum.

Things this needs added:

kode54 commented 8 years ago

Minor comment, I notice the SMF to IP Board conversion is way faster, most likely because it doesn't have to run a complex regex process on every post and private message to undo IP Board's pre-processing to hash tagged HTML, which the SMF converter already spent pretty much all night doing.

kode54 commented 8 years ago

Here's another thing I did. It kind of breaks through licensing requirements, and requires a working copy of IP Board 2.3.x to run, but it will kindly use IP Board's own BBcode parser to translate the database entries of the posts table back to plain editor-friendly BBcode, and also translates the newlines to <br> tags, which is what ElkArte wants.

https://gist.github.com/kode54/a6e4117e81c329534966

Next up, I write another one to do the private messages table.

Note, that this script has no mention of any IPS proprietary code, except for function and class names, and script filenames. The init.php path must be specified by hand, but the rest can be generated from its settigs. It assumes your IPS setup is working, and can access the forum database.

kode54 commented 8 years ago

Further note on the importer, recent version. It appears that the IP Board 2.3.x script, or at least the portions that I use in my dump script, work on a server running PHP 5.5.x, which means I can dump it from a server I've fed the old database to, and much faster at that.

emanuele45 commented 8 years ago

Useful notes and great job @kode54!

kode54 commented 8 years ago

Further notes:

Good luck with that mess I gave you!

kode54 commented 8 years ago

New issue, related to my own translator: It needs to remove double-quotes from [url] tags, since those break ElkArte's parser.

kode54 commented 8 years ago

Here's a new addition. It seems it was pointless of me to try to convert the date stamps from the original IPS Board tags, as those strings are in local time or something stupid like that. So, the proper regex replacement for quoteo/quotec with the full info is to generate the author and link=msg values, then fill in a zero for the date, and let this script fix it:

https://gist.github.com/kode54/80e3be8698f521109b6f

kode54 commented 8 years ago

And here's an attempt to fix up polls, which only supports single question polls, and only supports single choice polls:

https://gist.github.com/kode54/a4ec219b9ce4b1b750d3