News:

Wondering if this will always be free?  See why free is better.

Main Menu

IPB 1.3 Convert Member with Avatars into an existing SMF

Started by Erlo, December 23, 2008, 04:22:28 PM

Previous topic - Next topic

Erlo

Hi folks,

I'm running two IPBs and converted one into a SMF last year.
Now, I'm moving into another server with both BBs. Because my last IPB is on 1.3 and not updated anymore, i want to migrate the User (with user-profile) into the existing SMF.
I don't want to convert any posts.
The migrated members are not a hughe amount, but I want to make the software change in a comfort way for these users...
I think I have to take a look at a few imported members, correct the permissiongroups (private area).

Well, today, I played with the scripts and recognized, that i "only" has to change the "invision_to_smf.sql"
Well, I deleted the TRUNCATE - Statements and removed every other statement around Posts and Threads.
Next step, i changed the member SELECT - Statement, removed "id AS ID_MEMBER," ; it leads to new Member-IDs. This worked for the Member-Accounts and the permissionsgroups are looking correct.
But after this id-modification, it seems, that i'm not able to transfer the attachments correctly.

Well, I have the idea to make a script, which raizes the member-IDs on the source-board. In fact, it should raze the ID in the tables member and attachements. I thought of trying to import the private messages, too. What do you think?

Can you give me any tips for improving the import?
Does it sound realistic?

best regards
Erlo

ThorstenE

Hi Erlo,
don't forget to make a full backup before playing with the database.

there is often more than one possible solution:
1) convert your IPB to SMF (Full conversion), then merge your new SMF with the current SMF.  There is an unofficial merging script available at:
http://resourcez.biz/index.php?action=tpmod;dl=item7

2) you can raise the ID_MEMBER for the members and attachments conversion. you need to undo your changes with : id AS ID_MEMBER,

in the ipb_to_smf.sql you'll find something like this:

---* {$to_prefix}members
---{
$row['signature'] = addslashes(preg_replace(


add something similar like this:

$row['ID_MEMBER'] = $row['ID_MEMBER'] +10000;
this will increase the ID_MEMBER from your old IPB by 10000 before they are inserted into SMF.

The full code block then looks like this

---* {$to_prefix}members
---{
$row['ID_MEMBER'] = $row['ID_MEMBER'] +10000;
$row['signature'] = addslashes(preg_replace(


this can also be done for the attachments (avatars) or the PMs.

another example for PM recipients


/******************************************************************************/
--- Converting personal messages (step 2)...
/******************************************************************************/
---* {$to_prefix}pm_recipients
---{
$row['ID_MEMBER'] = $row['ID_MEMBER'] +10000;
---}
SELECT

the blocks in brackets ---{ }--- before the select statements are parsed before the INSERT from convert.php

but: don't forget to make a full backup before playing with the database.

Edit by TE: some typos fixed ;)

Erlo

Hi TE,

that looks like a nicer solution than my pre-import script :D
I'm testing every script and database-convert on my testing server at home :)

I think, i'll try the +1000 solution in the next days - I'll do a report.

Thanks, best regards and merry Christmas

Erlo
PS: TE, frohe Weihnachten ich hoffe du hast ein wenig Schnee bei dir :)

ThorstenE

Erlo,
any luck with tihs?

PS: zu spät, aber trotzdem noch frohe Weihnachten, wir haben hier so gut wie nie Schnee ;)

Erlo

Hi TE,

Since christmas i have not enough time to try this. But i'm just creating my test-server with new backups and trying the script.

best regards
Erlo

Erlo

Well, on my test machine it works  :D

I deleted everything without these sections:


--- Converting members...
[...]
--- Converting personal messages (step 1)...
[...]
--- Converting personal messages (step 2)...
[...]
--- Converting avatars...


Remove the truncate Statements!!

Add after

---* {$to_prefix}members
---{



$row['ID_MEMBER'] = $row['ID_MEMBER'] +75;

Change the number "75" into the max member-number of your destination-board. Remeber this value!

Next - PMs

Add after

---* {$to_prefix}personal_messages
---{

this:

$row['ID_MEMBER_FROM'] = $row['ID_MEMBER_FROM'] +75;
$row['ID_PM'] = $row['ID_PM'] + 200;

Important! Change the 75 into the value of the member-part .  After this find the max PM number of your destination board an modify my "200" into it.

Next Step "PM Part2"
Find:

---* {$to_prefix}pm_recipients

Add

---{
$row['ID_MEMBER'] = $row['ID_MEMBER'] +75;
$row['ID_PM'] = $row['ID_PM'] + 200;
---}

(Change the values again ;) )

Final Step:
Find

---* {$to_prefix}attachments
---{

and add:

$row['ID_MEMBER'] = $row['ID_MEMBER'] +75;


Well, converting the orginal IBB Avatars does not work.. PMs works and avatars, too.
I think, i'll try a REAL run these day ;)

BEST regards
Erlo
*dance*

Advertisement: