• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

PunBB 1.2/1.3 Importer

Status
Not open for further replies.

Benjy

Well-known member
Hi everyone,

I recently had to write an importer for a PunBB 1.2.x install so I decided to make it also compatible with 1.3.x (an 1.4.x?) and release it to the community.

These are the things I know work (at least for PunBB 1.2.x):
- avatars
- bans
- forums
- moderators
- threads and posts
- user groups (and a very basic set of permissions)
- users (passwords are retained and a custom authentication class is provided)

** IT IS HIGHLY RECOMMENDED TO TEST THIS IMPORTER BEFORE USING IT ON A PRODUCTION ENVIRONMENT **
** I WILL NOT BE HELD RESPONSIBLE FOR ANY DATA LOSS/CORRUPTION **

Usage:
- unzip
- upload the whole "/library/CodeInMotion" folder to your "/library/" folder
- install the "addon-cim_punbb_importer.xml" add-on
- you should now see a PunBB option in the list of available importers
- for the the "Custom Avatar Directory", input the complete absolute path of the folder where your avatars are stored (without trailing slash)

Latest Version: 1.30
Release date: Dec 19, 2011

A FluxBB importer is available here: http://xenforo.com/community/threads/fluxbb-1-4-importer.19288/

NB: I might not support this very much as my work is essentially done.
 

Attachments

Update: corrected a bug with moderator permissions in "/library/XenForo/Importer/PunBB.php"
 
Update for XenForo 1.0.1: use new phrases and removed _convertToUtf8 function declaration
 
To the devs: the getImporterList() method of the Import model reads the "/library/XenForo/Importer/" folder, thus it is not possible to have an importer as a complete add-on (or I haven't figured how).
You can push values onto the static $extraImporters array within the Importer model using a hook, which gets around the directory listing limitation :)

Screen shot 2011-04-07 at 12.19.52.webp
 
You can push values onto the static $extraImporters array within the Importer model using a hook, which gets around the directory listing limitation :)
Thank you very much for pointing this out Kier! I updated the importer accordingly and it seems to work.
 
Thank you for creating this import tool.

However, I'm facing a problem with importing threads.

During the import, I see that all the forums are created. For example, I have a forum called 'Feature requests'. In the forum list it shows with 457 discussions, and 5009 messages.
But when I click it, the forum is empty.

The weirdest part of all this, is that *some* of the forums are imported correctly, and some aren't.

I tried 2 different databases, multiple times, but I keep having the same issue.. And yes I rebuild the whole thing. ;) And after the rebuild, the forum listing is telling me that there are 0 discussions and 0 messages...

Any clue?

[EDIT]
I think I'm on to something. It looks like the importer is connecting threads to categories.

I have a node_id 14 named 'Administration', which is a category and not a forum.
I have a thread_id 2030, which is connected to node_id 14.
If I open a post directly (with a direct link (XF/posts/17188/)) it gives me an error: 'The requested forum could not be found'.
 
Thank you for creating this import tool.

However, I'm facing a problem with importing threads.

During the import, I see that all the forums are created. For example, I have a forum called 'Feature requests'. In the forum list it shows with 457 discussions, and 5009 messages.
But when I click it, the forum is empty.

The weirdest part of all this, is that *some* of the forums are imported correctly, and some aren't.

I tried 2 different databases, multiple times, but I keep having the same issue.. And yes I rebuild the whole thing. ;) And after the rebuild, the forum listing is telling me that there are 0 discussions and 0 messages...

Any clue?

Have you rebuild your threads and post index Gwynei ?

If not, (..../admin.php?tools/rebuild) - Rebuild your threads, forums and search index.
 
Yeah I guess he's the only one who can find this bug. ;)

I got a workaround for this issue though, with the following SQL statements I got the wrong threads moved to the right forum. Then I rebuild and I get correct results. :D

Code:
UPDATE xf_thread SET node_id = 4 WHERE node_id = 9;
UPDATE xf_thread SET node_id = 5 WHERE node_id = 12;
UPDATE xf_thread SET node_id = 6 WHERE node_id = 14;
UPDATE xf_thread SET node_id = 10 WHERE node_id = 18;
 
Sorry for not replying sooner.
Would it be, by any chance, possible to have access to your dataset? (or an excerpt of it) I only had one dataset for my tests and it was fairly simple so it is highly possible I messed up somewhere.
 
Sorry for not replying sooner.
Would it be, by any chance, possible to have access to your dataset? (or an excerpt of it) I only had one dataset for my tests and it was fairly simple so it is highly possible I messed up somewhere.
No problem :)

You mean a .sql datadump for testing purposes? Which tables do you need? I will anonymize the data first ofcourse..

[EDIT]
Btw, I'm using Punbb 1.3.4 (well I was, now I'm running XenForo ;))
 
No problem :)

You mean a .sql datadump for testing purposes? Which tables do you need? I will anonymize the data first ofcourse..
Ideally the whole dataset (you can remove the email addresses), but I'm mainly interested in the pun_categories and pun_forums tables.
 
Would this also work with FluxBB?
As FluxBB is a fork of punBB, the suspected answer is Yes. Maybe benjy could confirm.
Ask the FluxBB team if they have changed the MySQL database tables vs. what punBB uses.

FluxBB is a lightweight free software PHP-based internet discussion board system. FluxBB is a fork of the PunBB project, created in response to developers protesting the increasing emphasis of a partnership with a corporate organization on the PunBB project.[1] As with PunBB, it is released under the GNU General Public License.
 
Just tried this with fluxbb, it imports some things, but I get errors with others
Try importing fluxbb into punbb and then into xenforo ?
xenFans.com could probably get you migrated from fluxBB to xenForo.
good prices :)
they will use vBulletin IMPEX to go fluxBB to vB3 to xenforo.
 
Status
Not open for further replies.
Top Bottom