ElkArte Community

General => OpenImporter => Topic started by: brianelk on July 18, 2018, 03:45:34 pm

Title: Hi I'm new and need information
Post by: brianelk on July 18, 2018, 03:45:34 pm
I have just installed and got ElkArte running and now wish to import data from my old phpbb forum on the same host. I found OpenImporter and am now stuck as there are no instructions. I assume it needs installing on my host? could some kind soul please point me in the right direction?
Thanks.
Title: Re: Hi I'm new and need information
Post by: radu81 on July 19, 2018, 03:01:15 am
Hello and welcome to elkarte!

I did not test Openimporter with a phpBB forum, but should work, the steps you need to do are:


Let us know if it works for you or if you have problems.
Title: Re: Hi I'm new and need information
Post by: brianelk on July 19, 2018, 03:17:25 am
Morning! Thank you. In the meantime I managed to work it out and can now run OpenImporter thanks.

But

It is asking for the database password. I tried several such as my cPanel login and host login passwords but no go. So I foolishly changed the database password in cPanel. It didn't show what the old password was and the new one I entered didn't work in OpenImporter anyway! :-[

So I am stuck. I've asked my Hosts support about the password but not got a reply as yet. The program does say to look in settings.php for the password but where to find that file? And anyway it will be encrypted won't it?

Oh dear.
Title: Re: Hi I'm new and need information
Post by: ahrasis on July 19, 2018, 04:01:21 am
You can always check your forum database login and password in the Settings.php file.
Title: Re: Hi I'm new and need information
Post by: brianelk on July 19, 2018, 05:10:29 am
Yes but where is the settings.php file please??
Title: Re: Hi I'm new and need information
Post by: ahrasis on July 19, 2018, 07:20:13 am
Root of your forum.
Title: Re: Hi I'm new and need information
Post by: brianelk on July 20, 2018, 11:55:41 am
Just rereading Radu81's reply I realised he means I have to have Elkarte installed to the same phpbb database but using its own prefix. Ah. It's already installed with its own database and is in use.

So if I installed a tempoary Elkarte and ran openimport, could I then import that into my production Elk?

There must be a way of getting the phpbb data into elk without writing a fullblown SQL query which is beyond me anyway!
Title: Re: Hi I'm new and need information
Post by: Jason on July 20, 2018, 12:47:06 pm
@brianelk try this tutorial - https://www.elkarte.net/community/index.php?topic=5170.0 It is for MyBB, but the steps are same.

"Now enter the database password of ElkArte (if you don’t remember, get the password from settings.php)"
Title: Re: Hi I'm new and need information
Post by: brianelk on July 20, 2018, 01:12:18 pm
That's great Jason but it means I would then have two Elkarte databases - my production one and the imported one. Now how would I merge the two please?!
Title: Re: Hi I'm new and need information
Post by: Jason on July 20, 2018, 01:16:08 pm
@brianelk sorry i don't have any idea. Wait for the experts.
Title: Re: Hi I'm new and need information
Post by: emanuele on July 21, 2018, 12:04:21 pm
Okay, here we are.

Long lasting problem: merging two forums.
Merge two Elk installs is not entirely so easy.
OpenImporter doesn't really help on this, because the script is developed considering the need to import from an existing forum platform to a new install of another platform. So one of the first things that OI does is to wipe out any data from the destination database.

Assuming you would be good enough to have a merge of the posts (i.e. no personal messages) the cleanest way to "merge" two forums would be to take each message from the "source" database and create an entirely new post in Elk (to ensure consistency of the database), then update the necessary fields (like time of creation).
Assuming this can be done somehow easily, this approach would have quite a drawback: in ElkArte both messages and topics are sorted by the "id" of the topic (not by the data of creation), the design choice was taken a looooooooooooong way ago because the key is supposed to always be representative of the position of the topic in the time-based order and this saves the creation of an index ensuring the best performances.
I proposed a while ago to drop this requirement (i.e. add an index to the time columns of topics and messages tables and sort by that) because nowadays, space is cheap and the performance loss is risible (in fact it would be the additional time necessary when a topic/post is created in order to update an additional index). But honestly I didn't invest much time, because the only advantage would be exactly this: be able to merge two forums without many side-effects. And this is not really a frequent case. Annoying for the one facing the situation, indeed, but still a quite limited problem.

I think the merging script could be sorted out somehow, in theory it could even be possible to merge two existing forums into a third preserving the sorting, it's a bit more complex, but it's not impossible.
Title: Re: Hi I'm new and need information
Post by: Jason on July 21, 2018, 12:10:56 pm
@brianelk try this if you want to. First install phpbb in yoursite.com/phpbb and import your old database into phpbb. Once done, install Elkarte in the root (yoursite.com) and use open importer to import your old phpbb post from yoursite.com/phpbb.
Title: Re: Hi I'm new and need information
Post by: brianelk on July 21, 2018, 01:46:24 pm
@Jason thanks for the suggestion. It seems OI has to be in the same directory as the forum then. I'll look at that, thanks.

@emanuel you have clearly given my transfer issue a lot of thought. Thank you. My skills are limited as regards databases. I wonder if I wouldn't be better off using a free relational database manager on my PC to simply extract the actual post contents and make them available to my users as a read-only archive as it is the content itself they want. Pity Microsoft Access isn't still around, I could use that!
Title: Re: Hi I'm new and need information
Post by: emanuele on July 21, 2018, 02:00:52 pm
hmm... let me think a bit, something is going in circle in my mind and I have a foggy idea, but I have to clear it up a bit.