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.

SMF 2 Importer

Discussion in 'Add-on Releases [Archive]' started by Robbo, Nov 5, 2010.

  1. Robbo

    Robbo Well-Known Member

    So I decided to change over to XenForo for a project I am involved in and was using SMF 2 for. I have worked with SMF 2 for several years now and figured I may as well do it right and write an importer.

    So here is the incomplete importer which I will finish when I get free time or need it again...

    TODO
    - import polls
    - import moderators
    - import permissions per board
    - other small settings here and there
    - lots of other stuff that I can't think of, it is far from done

    Importing polls isn't in yet as I never needed it, same with moderators and some other features it is missing. I have also barely tested it so be careful! I am not at fault if your server dies a horrible death.

    I am not going to give support here however if you find a bug I'll try and find time to fix it.

    User merging isn't supported and I don't plan to support it. This is designed to be used on a fresh install of XenForo. If there are any users that 'collide' then it will fail.

    Installing
    Upload the attached file and then install the addon by going to admin -> install addon and running SMF2Importer.xml. Go into tools -> import external data and see how you go from there.

    No promises but I hope it works for you.
    I also don't take into account charsets as of yet. Basically I had to take a heap of shortcuts to get what I needed done. I will hopefully finish it one day if there is any demand for it.
     

    Attached Files:

  2. Robbo

    Robbo Well-Known Member

    Seems importing private messages is a bit buggy.
     
  3. Dismal Shadow

    Dismal Shadow Active Member

    Nice, finally a importer. However when creating a template I get a error when I try ti save it.

    "The following templates contained errors and were not saved: import_smf2_config: 1) Line 3: Unknown tag: form"
     
  4. Robbo

    Robbo Well-Known Member

    This is an admin template. You have to put your forum into debug mode and go to developement -> admin templates.
     
  5. Robbo

    Robbo Well-Known Member

    Private messages importing fixed. Didn't test but pretty sure it is fixed.
     
  6. Dismal Shadow

    Dismal Shadow Active Member

    I guess it doesn't work for me as I am getting this when trying to import:

    Code:
    Server Error
    
    unserialize() [function.unserialize]: Error at offset 0 of 60 bytes
    
    XenForo_Application::handlePhpError() in XenForo/Importer/SMF2.php at line 34
    XenForo_Importer_SMF2->configure() in XenForo/ControllerAdmin/Import.php at line 56
    XenForo_ControllerAdmin_Import->actionConfig() in XenForo/FrontController.php at line 303
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
    XenForo_FrontController->run() in /home/********/public_html/dev/test/upload/admin.php at line 13
    This is from old RC3 database, perhaps upgrading to RC4 might work... but I am getting the feeling it will throw the same error.
     
  7. MordyT

    MordyT Active Member

    I am very interested in this. Will use when it is stable/complete.
     
  8. Anthony Parsons

    Anthony Parsons Well-Known Member

    Good stuff... excellent to see more importers being developed.
     
    Puntocom likes this.
  9. Robbo

    Robbo Well-Known Member

    I have a theory that SMF only serializes it when there is more then one attachment path. Will test it when I get a chance. The more you annoy me on here the more likely I will get it done.
     
  10. Dismal Shadow

    Dismal Shadow Active Member

    Lol, you know me only too well, I'm sure to flag anything I can find. :)
     
  11. Robbo

    Robbo Well-Known Member

    I know your name but don't actually know who you are heh. I'm also in a state of drunkness and tiredness so things that are obvious... well aren't so obvious atm.
     
  12. Dismal Shadow

    Dismal Shadow Active Member

    Ok, I have updated the database to RC4 and get the same error so it might be a issue with the attachment path you mentioned.
     
  13. Robbo

    Robbo Well-Known Member

    Yeah I am pretty sure what I am getting from the database is incorrect and only right if you use more then one attachment path. I'll look into it soon.

    Also I did all my testing etc on an RC3 board and am assuming it works with RC4 :p
     
  14. Robbo

    Robbo Well-Known Member

    Ok since I haven't had time to setup a new enviroment for testing (my last one has gone as a live site heh) can you try something to see if my theory is correct and allow you to get past your error?

    Go into your SMF attachment settings and configure a second attachment path. I think that SMF stores one attachment path in the database as a string and then if anymore are added it creates a serialized array. Or something similar.
     
  15. Robbo

    Robbo Well-Known Member

    Also I have discovered a couple things that haven't imported properly which I will try get fixed in the next release. I really need to setup a bug tracker for this since there is bound to be a lot. Another thought, I should create a bug tracker on the XF platform.
     
  16. Xarcell

    Xarcell Well-Known Member

    Didn't expect to see you here Robbo!

    Anyhow, thanks for the importer. I'll be using it.
     
  17. Dismal Shadow

    Dismal Shadow Active Member

    Added another path but it throwing the same error.
     
  18. Robbo

    Robbo Well-Known Member

    Lol I go to where my life is made easy. My life is made easy by XF code and SMF is progressing far too slow and stuck in the past.
    Damn. Will try get some time to look at it soon. Was going to today but it turns out I'm sick lol.
     
  19. Dismal Shadow

    Dismal Shadow Active Member

    You still sick Robbo? :p
     
  20. Floris

    Floris Guest

    I've followed you on irc.xenfans.com in #chat as to making the smf2 importer, and I am happy to see it's release here and how far you've come. Very awesome stuff.
     

Share This Page