1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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

Discussion in 'Add-on Releases [Archive]' started by Benjy, Mar 28, 2011.

Thread Status:
Not open for further replies.
  1. Benjy

    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.
     

    Attached Files:

    kalco, sforum, ascerb and 12 others like this.
  2. Benjy

    Benjy Well-Known Member

    Update: corrected a bug with moderator permissions in "/library/XenForo/Importer/PunBB.php"
     
  3. Nasr

    Nasr Well-Known Member

    good job
     
  4. Benjy

    Benjy Well-Known Member

    Update for XenForo 1.0.1: use new phrases and removed _convertToUtf8 function declaration
     
  5. Kier

    Kier XenForo Developer Staff Member

    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.png
     
    Benjy likes this.
  6. Benjy

    Benjy Well-Known Member

    Thank you very much for pointing this out Kier! I updated the importer accordingly and it seems to work.
     
    Kier likes this.
  7. Benjy

    Benjy Well-Known Member

    v1.11: corrected (*hope*) an awful bug with bans
     
  8. Gwynei

    Gwynei Member

    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'.
     
  9. yavuz

    yavuz Well-Known Member

    Have you rebuild your threads and post index Gwynei ?

    If not, (..../admin.php?tools/rebuild) - Rebuild your threads, forums and search index.
     
  10. Gwynei

    Gwynei Member

    Yeah I did, but please read my edit if you like. :)
     
  11. yavuz

    yavuz Well-Known Member

    It sounded like you didn't, sorry :D
    I haven't tried this importer but maybe Benjy can elaborate more when he gets the chance.
     
  12. Gwynei

    Gwynei Member

    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;
    
     
    laztrix likes this.
  13. Benjy

    Benjy Well-Known Member

    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.
     
  14. Gwynei

    Gwynei Member

    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 ;))
     
  15. Benjy

    Benjy Well-Known Member

    Ideally the whole dataset (you can remove the email addresses), but I'm mainly interested in the pun_categories and pun_forums tables.
     
  16. Scott Dixon

    Scott Dixon Member

    Would this also work with FluxBB?
     
  17. Digital Doctor

    Digital Doctor Well-Known Member

    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.

     
  18. Scott Dixon

    Scott Dixon Member

    Thanks, I'll check it out and post back
     
  19. Scott Dixon

    Scott Dixon Member

    Just tried this with fluxbb, it imports some things, but I get errors with others, too bad for me, I really wanted to switch from fluxbb . Here is a link to the errors I received in case anyone was interested http://pastebin.com/ZdFhb0ii
     
  20. Digital Doctor

    Digital Doctor Well-Known Member

    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.
     
Thread Status:
Not open for further replies.

Share This Page