XenForo 1.2 --> SMF 2.0.x converter

guclusat

Tanınmış Üye
Süper Moderatör
Following some requests here, I tried to create a converter from XF. The attached file results of some trial-and-error around XF's database schema and the necessary equivalent in SMF.
Unfortunately I struggled too much with the "official" converters so I eventually gave up and started from scratch. I know that I've probably tried to reinvent the wheel but this way I know what I am doing, every step of the way.
Also, I'm not very good at design and present forms to fill and blablabla. So, there is no beautiful layout and some file edits are needed. Nothing too much, but it has to be done.

What the converter will convert:
  • Members
  • Categories
  • Boards
  • Topics/Posts
  • PMs
  • post attachments
  • avatars
  • polls

How to use this converter:
1 - BACKUP
2 - Install SMF in a separate folder and in the same database as XF
3 - Download the attached "xf2smf.php" file to you computer and edit it with a decent editor (eg: Notepad++). The small edits that are needed are all localized in this part here:
3.1 - You need to define the folder where XF is installed. By folder, I mean the server path where XF's installation is located. SMF's path is automatically discovered (because you will put the file there). If you don't know it, please upload the attached "whats_the_path.php" file to XF's folder and run it via browser. It will tell you the path you should add.
3.2 - You need to adjust my "$max_queries" variable. This defines how many registers the converter tries to move at once. A low number takes a LOT of time, a large number will hammer your server and may cause it to become unresponsive.
3.3 - As my image above states, I didn't find a way to change XF's table prefix, so it shouldn't be necessary to change anything else. But, in case your prefix isn't "xf_" please edit the corresponding line
4 - Save. Load the file "xf2smf.php" to SMF's folder and launch it through your browser. The whole "thing" is a step-by-step operation and each step deals with each of the converted parts.
4.1 - You will notice, in the first screen, that the paths for SMF and XF (the first one is self-discovered, the second was set by you) are shown. Please check them
5 - When the conversion finishes, you should remove the file from your SMF folder. Go to your newly converted forum and recover your password. The converter does not (and probably will not) convert passwords so you need to follow the usual steps for password recovery. If you cannot email yourself a new password, use this trick from the wiki:

Resetting an admin users password

Use phpMyAdmin (or similar) to locate (within the "_members" table) the member whose password is to be reset. In the database field entitled "passwd", enter a new password using plain text.
Then, clear out (erase) any existing content in the database field entitled "password_salt".
The next time the member logs in (using the new password), SMF will automatically re-encrypt his credentials.

6 - Go to your ACP --> Maintenance --> Recount all forum totals and statistics. This will (obviously) fill your boards and topics totals.

That's it, for now. Please do test and let me know the outcome. If the converter throws a "database error" somewhere, it will be stored in the table "smf_log_errors" (it will probably be the last one). It is handy if you check that table and also attach your "xf2smf.php" in use.
Finally, be advised that this was developed and tested with a local installation of XAMPP, so I cannot tell the impact in a live and especially shared server. It shouldn't kill it, don't worry

License: Simplified BSD (BSD-2)
 

Eklentiler

  • img1.png
    img1.png
    17,1 KB · Görüntüleme: 1
  • img2.png
    img2.png
    4,9 KB · Görüntüleme: 1
  • whats_the_path.zip
    whats_the_path.zip
    221 bayt · Görüntüleme: 5
  • xf2smf.ZIP
    xf2smf.ZIP
    17,8 KB · Görüntüleme: 2
Geri
Yukarı