Skip to main content
[MyBB 1.8] Importer Started by TE · · Read 58561 times 0 Members and 2 Guests are viewing this topic. previous topic - next topic - Topic derived from Converting MyBB to Elk

[MyBB 1.8] Importer

The attached version can hopefully import a MyBB 1.8 forum to ElkArte 1.0 ..

Importing Members... ✔
Importing Categories... ✔
Importing Boards... ✔
Importing Topics... ✔
Importing Messages... ✔
Importing polls... ✔
Importing poll choices... ✔
Importing poll votes... ✔
Importing personal messages... ✔
Importing pm recipients... ✔
Importing topic notifications... ✔
Importing board notifications... ✔
Importing attachments... ✔
Importing avatars... ✔

It's based on a totally outdated version of Openimporter. the newer ones (especially the ones for MyBB seem to be completely broken). Just upload the three files to your ElkArte directory and call import.php from your favourite web browser..
Last Edit: January 12, 2016, 07:18:36 am by TE
Thorsten "TE" Eurich
------------------------

Re: [MyBB 1.8] Importer

Reply #1

Great job @TE 

Re: [MyBB 1.8] Importer

Reply #2

Awesome work @TE

 

Re: [MyBB 1.8] Importer

Reply #3

Have problems in importing poll,

Importing Members... ✔
Importing Categories... ✔
Importing Boards... ✔
Importing Topics... ✔
Importing Messages... ✔
Importing polls... ✔
Importing poll choices... Unsuccessful!
This query:

    INSERT IGNORE INTO elk.elkarte_poll_choices
    (id_poll, id_choice, label, votes)
    VALUES (1, 1, "WordPress", 2),
    (1, 2, "Blogspot", 0),
    (2, 1, "Free", 1),
    (2, 2, "Paid", 6),
    ('2', 'Free||~|~||Paid', '1||~|~||6'),
    (4, 1, "Yes", 4),
    (4, 2, "Ok with the current one.", 1),
    ('4', 'Yes||~|~||Ok with the current one.', '4||~|~||1'),
    (5, 1, "Android", 2),
    (5, 2, "BB", 0),
    (5, 3, "Symbian", 1),
    (5, 4, "Windows", 1),
    (5, 5, "iOS", 2),
    (5, 6, "Java", 0),
    (5, 7, "Bada", 0),
    (5, 8, "Meego", 0),
    (5, 9, "Firefox OS", 0),
    (5, 10, "Sailfish OS", 0),
    ('5', 'Android||~|~||BB||~|~||Symbian||~|~||Windows||~|~||iOS||~|~||Java||~|~||Bada||~|~||Meego||~|~||Firefox OS||~|~||Sailfish OS', '2||~|~||0||~|~||1||~|~||1||~|~||2||~|~||0||~|~||0||~|~||0||~|~||0||~|~||0'),
    (6, 1, "5", 0),
    (6, 2, "4", 0),
    (6, 3, "3", 0),
    (6, 4, "2", 2),
    (6, 5, "1", 0),
    ('6', '5||~|~||4||~|~||3||~|~||2||~|~||1', '0||~|~||0||~|~||0||~|~||2||~|~||0'),
    (7, 1, "Keep it", 1),
    (7, 2, "Rip it", 2),
    ('7', 'Keep it||~|~||Rip it', '1||~|~||2'),
    (8, 1, "Indianstalkzone.com", 0),
    (8, 2, "IndianChitChat.com", 3),
    (8, 3, "Indiantalkzone.com", 3),
    (8, 4, "Indiancc.com", 2),
    (8, 5, "ChatZoneIndia.com", 1),
    ('8', 'Indianstalkzone.com||~|~||IndianChitChat.com||~|~||Indiantalkzone.com||~|~||Indiancc.com||~|~||ChatZoneIndia.com', '0||~|~||3||~|~||3||~|~||2||~|~||1'),
    (9, 1, "Coffee!", 0),
    (9, 2, "Tea!", 2),
    (9, 3, "Both!", 4),
    (9, 4, "Neither.", 0),
    ('9', 'Coffee!||~|~||Tea!||~|~||Both!||~|~||Neither.', '0||~|~||2||~|~||4||~|~||0'),
    (10, 1, "Chennai Super Kings", 3),
    (10, 2, "Delhi Daredevils", 2),
    (10, 3, "Kings XI Punjab", 2),
    (10, 4, "Kolkata Knight Riders", 4),
    (10, 5, "Mumbai Indians", 2),
    (10, 6, "Rajasthan Royals", 1),
    (10, 7, "Royal Challengers Bangalore", 3),
    (10, 8, "Sunrisers Hyderabad", 1),
    ('10', 'Chennai Super Kings||~|~||Delhi Daredevils||~|~||Kings XI Punjab||~|~||Kolkata Knight Riders||~|~||Mumbai Indians||~|~||Rajasthan Royals||~|~||Royal Challengers Bangalore||~|~||Sunrisers Hyderabad', '3||~|~||2||~|~||2||~|~||4||~|~||2||~|~||1||~|~||3||~|~||1'),
    (11, 1, "yay", 1),
    (11, 2, "nay", 1),
    (11, 3, "IT DOESNT MATTER WHAT I WANT", 0),
    ('11', 'yay||~|~||nay||~|~||IT DOESNT MATTER WHAT I WANT', '1||~|~||1||~|~||0'),
    (12, 1, "Square", 2),
    (12, 2, "Round", 3),
    ('12', 'Square||~|~||Round', '2||~|~||3'),
    (13, 1, "Firefox", 2),
    (13, 2, "Chrome", 0),
    ('13', 'Firefox||~|~||Chrome', '2||~|~||0'),
    (14, 1, "Internet Explorer / Edge", 0),
    (14, 2, "Google Chrome / Chromium / Iron", 1),
    (14, 3, "Firefox", 2),
    (14, 4, "Opera", 0),
    (14, 5, "Safari", 0),
    (14, 6, "Other", 0),
    ('14', 'Internet Explorer / Edge||~|~||Google Chrome / Chromium / Iron||~|~||Firefox||~|~||Opera||~|~||Safari||~|~||Other', '0||~|~||1||~|~||2||~|~||0||~|~||0||~|~||0'),
    (15, 1, "Yes", 1),
    (15, 2, "No", 3),
    ('15', 'Yes||~|~||No', '1||~|~||3'),
    (16, 1, "MyBB", 2),
    (16, 2, "phpBB", 0),
    (16, 3, "SMF", 0),
    ('16', 'MyBB||~|~||phpBB||~|~||SMF', '2||~|~||0||~|~||0'),
    (17, 1, "Yes!", 2),
    (17, 2, "No", 0),
    ('17', 'Yes!||~|~||No', '2||~|~||0');

Caused the error:

    Column count doesn't match value count at row 5

Re: [MyBB 1.8] Importer

Reply #4

And the subcategories in a main category, comes out as new main category.

Ex: Mobiles (cat) > Android (sub cat) (in MyBB)
Mobiles (cat)
Android (cat)

Re: [MyBB 1.8] Importer

Reply #5

@IndianTalkZone ,thanks for reporting the bugs. I hope @TE will be able to come up with a fix.

Re: [MyBB 1.8] Importer

Reply #6

please try again with the attached mybb18_importer.xml, should at leat fix the issues regarding polls..

Re: [MyBB 1.8] Importer

Reply #7

Thanks TE, the poll issue is fixed. Now the attachment..i don't whether it is a problem with wamp..


Message: getimagesize(G:\wamp\www/attachments/1_7a18519243bbaabb294cce2a2dfe74e8d4cbd794.elk): failed to open stream: No such file or directory
Trace: getimagesize(G:\wamp\www/attachments/1_7a18519243bbaabb294cce2a2dfe74e8d4cbd794.elk): failed to open stream: No such file or directory
Line: 33
File: G:\wamp\www\import\import.php(846) : eval()'d code

Re: [MyBB 1.8] Importer

Reply #8

Probably missing attachment files? Is it a real MyBB forum or just a database backup you're trying to import? Maybe the attachment files aren't part of your backup?
Thorsten "TE" Eurich
------------------------

Re: [MyBB 1.8] Importer

Reply #9

Quote from: TE – Probably missing attachment files? Is it a real MyBB forum or just a database backup you're trying to import? Maybe the attachment files aren't part of your backup?

It is a real MyBB backup database, my current forum DB (www.indiantalkzone.com). Downloaded using phpMyAdmin in the control panel and tried.

Re: [MyBB 1.8] Importer

Reply #10

Quote from: IndianTalkZone – . Downloaded using phpMyAdmin in the control panel and tried.
Ah, then you only downloaded the database. The attachments and avatars are not part of the database, they are files under the MyBB folder /uploads and you'd need to copy this folder to localhost in order to import attachments & avatars..
Thorsten "TE" Eurich
------------------------

Re: [MyBB 1.8] Importer

Reply #11

I have uploaded the folder to my localhost from /uploads (live) to /uploads (localhost) still some problem.


Message: filesize(): stat failed for G:\wamp\www/attachments/4_f81a866f99d98822837317eab6b92129cbea37e9.elk
Trace: filesize(): stat failed for G:\wamp\www/attachments/4_f81a866f99d98822837317eab6b92129cbea37e9.elk
Line: 14
File: G:\wamp\www\import\import.php(846) : eval()'d code


I deleted attachments in MyBB db and tried again..but it didn't work. I am doing something wrong?

Re: [MyBB 1.8] Importer

Reply #12

can you check the path G:\wamp\www/attachments/4_f81a866f99d98822837317eab6b92129cbea37e9.elk with windows explorer?
Does this folder folder  G:\wamp\www/attachments/ exist?
Thorsten "TE" Eurich
------------------------

Re: [MyBB 1.8] Importer

Reply #13

Here you go

Importing...

Importing Members... ✔
Importing Categories... ✔
Importing Boards... ✔
Importing Topics... ✔
Importing Messages... ✔
Importing polls... ✔
Importing poll choices... ✔
Importing poll votes... ✔
Importing personal messages... ✔
Importing pm recipients... ✔
Importing topic notifications... ✔
Importing board notifications... ✔
Importing attachments... ✔
Importing avatars...
Message: filesize(): stat failed for G:\wamp\www/attachments/4_8b68f0ad289fd94fccf1cef5b74bd21ee62f352f.elk
Trace: filesize(): stat failed for G:\wamp\www/attachments/4_8b68f0ad289fd94fccf1cef5b74bd21ee62f352f.elk
Line: 14
File: G:\wamp\www\import\import.php(846) : eval()'d code


Everytime the attachment name changes.

Re: [MyBB 1.8] Importer

Reply #14

Attached a new version, can you test this one please?