Skip to main content
Topic: OpenImporter (Read 59487 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: OpenImporter

Reply #75

Back a moment on the "how" OpenImporter works.
I may already have proposed that, though better have it written all in one place.

At the moment the biggest limitation I see is that OI requires to write an importer for any platform you want to support the conversion to.
This makes it not much better than any importer/converter already existing for one of the many forums around the world.

A very cool thing would be to split the "export" process from the "import", that way, writing an importer would be enough to cover the exports to any platform already supported.

Let me explain a bit better. What I have in mind is nothing too fancy, basically is create a sort of "intermediate array" that will act as proxy between importers and exporters.
So, the process will be:
importers grabs info from the source platform and converts to the "intermediate array"
exporters takes in the data from the "intermediate array", converts to its own format and put them into the destination database/file system.
The advantage is that the "intermediate array" is common to any importer and exporter, so let's say we have an importer to Elk and Wedge, and exporters from SMF, vB4, XF and WP. If I tomorrow write an importer to phpBB, that will be automatically able to import data from SMF, vB4, XF and WP, without me having to write anything else.

This is of course the theory.

Honestly I have not yet tried anything like that, I'm still in the brainstorming phase, so it may even be impossible.
One potential problem I can see is if two sets of data are needed in order to build a third one, and do it in two phases is not an option. I have no examples of that at the moment, and I'm not sure how to build a "demo" of such a situation.
And it may become messy if a certain set includes data from two different tables.

Well, either way, the idea is here. Opinions, contributions, ideas, anything is welcome! ;D
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #76

Quote from: emanuele – A very cool thing would be to split the "export" process from the "import", that way, writing an importer would be enough to cover the exports to any platform already supported.
yep, that would be very cool..

the ultimate question: what to do with this temporary data (export)? store it in "temp" tables in the database or maybe in the file system (e.g. XML files)? Especially for bigger boards that may be a PITA (much more data, slow import + export)
Thorsten "TE" Eurich
------------------------

Re: OpenImporter

Reply #77

I was more thinking about an "on-the-fly" thing.
... little example: at the moment the xml file contains queries. These queries are make in such a way that data would fit into the destination database.
I would make the split here. The queries, instead of being formatted for the specific destination database format are designed for a "generic" data structure (another way to say an array with certain defined indexes). Then, the "destination", will have a function able to process this intermediate data and "convert" it into the form specific for that database.
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #78

What do I have to do to get the importer to work? I remember I had to copy import.php and two other files in the forum root folder. But it seems the importer has changed a lot. Can anyone please give me a hint?

Re: OpenImporter

Reply #79

Same as before, just copy all files to your host  (import.php and the file structure located in the Importer-Folder). Then run import.php from your webbrowser.
Thorsten "TE" Eurich
------------------------

Re: OpenImporter

Reply #80

Import.php is in forum root of the ElkArte forum, importer directory is there too. Is this right? I get the following error if I open import.php:

Code: [Select]
Warning: require_once(/www/htdocs/ftpuser/elkarte/openimporter.phar) [function.require-once]: failed to open stream: No such file or directory in /www/htdocs/ftpuser/elkarte/import.php on line 4

Fatal error: require_once() [function.require]: Failed opening required '/www/htdocs/ftpuser/elkarte/openimporter.phar' (include_path='.:/usr/share/php:..') in /www/htdocs/ftpuser/elkarte/import.php on line 4

Ah, so the files in the importer folder must be copied into the root too?

Re: OpenImporter

Reply #81

O_o

Where did you download the package?
Bugs creator.
Features destroyer.
Template killer.


 

Re: OpenImporter

Reply #83

Better remove it then... not at all sure what "version" it is.

@TE maybe we should start using some kind of versioning?
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #84

I thought this is the acutal version? If not, where can I download the package? Oh, not only think about this, write a short basic manual how to use it too.  :-X

Edit: Is this the place to download the latest version?

http://openimporter.github.io/openimporter/

Re: OpenImporter

Reply #85

Yep, that should be a "good" latest version.

As per using it:
download
extract
upload (technically anywhere accessible from the internet I'd suggest to create an "importer" directory in the root)
point the browser to yourdomain.tld/importer/import.php (of course "importer" if you followed my idea, otherwise it depends where you exactly put the code)
* follow instructions.
Bugs creator.
Features destroyer.
Template killer.

Re: OpenImporter

Reply #86

Thanks, I will try this package later.

Re: OpenImporter

Reply #87

Quote from: emanuele – @TE maybe we should start using some kind of versioning?
yep, definitely.. plus releases on Github?
Thorsten "TE" Eurich
------------------------

Re: OpenImporter

Reply #88

Do the import needs a functional domain to the forum? At the moment I am using the subdomain http://forum.hybrid-piloten.de for my SMF board. When I start the migration I want to link that subdomain to a small html site showing some information that the board isn't reachable for a while (http://migration.hybrid-piloten.de). Can I do this or will this lead to errors?

Re: OpenImporter

Reply #89

The importer doesn't change any configuration.
You have:
a working or not forum to import from (it can just be the configuration file (Settings.php for example) and the attachments if any, plus the database of course)
a working forum to import to.
a way to reach the file import.php
You set the URLs and paths when you install the forum, from that point on, the only thing that counts is that you car reach import.php from the web.

For example, you could set up:
forum.yourdomain.tld with the forum you want to import from (e.g. SMF)
forumnew.yourdomain.tld with the forum you want to import to (e.g. ElkArte)
migrationtool.yourdomain.tld the domain from which you reach import.php
at that point you can even deny access to forum.yourdomain.tld and newforum.yourdomain.tld and you will be able to do the conversion pointing to migrationtool.yourdomain.tld/import.php

I hope what I wrote does make some sense. lol
Bugs creator.
Features destroyer.
Template killer.