[Converter] XenForo 1.2 --> SMF 2.0.x

Started by margarett, October 06, 2013, 05:09:45 PM

Previous topic - Next topic

sc4t

Bonjour!

Always the same error message with the polls.

QuoteThis is the eight step of the conversion. We will now convert Polls


First, let's trash the actual contents of SMF "polls", "poll_choices" and "log_polls" tables....
Polls cleared from SMF tables. Next step, count what's there to move?? 0 polls, 0 poll responses and 0 poll votes were found in XF.
Now retrieving polls 1 to 0...
Erreur de base de données

Merci de r�essayer. Si l'erreur se reproduit, signalez cette erreur � un administrateur.
Retour.

There is also a problem with the file attachments.

http://www.scooter-chinois-4t.com/smf/tutoriels/comment-enlever-la-rouille-de-piece-metallique/msg134165/#msg134165
http://www.scooter-chinois-4t.com/forum/threads/comment-enlever-la-rouille-de-piece-metallique.13196/

margarett

That cannot happen. If there are no polls it should now skip that part completely. Can you please attach your current file?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

sc4t


margarett

Your file is still the old version, make sure you re-download the zip file on the first post ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair


margarett

That's a different problem altogether... I can look into that issue for you but I need access to your files and databases...

Attachments are converted over a simple method:
a) check XF's posts table and fetch posts with attachments
b) for each of these posts, get the respective attachment name, hash, etc. This allows to identify the file on disk.
c) directly copy it from XF_FOLDER/internal_data/attachments/0/ to SMF_FOLDER/attachments
//Now, we need to get the hashed file name from XF and convert it to a lovely filename. One we can actually use, ya know? :)
$oriname = $xf_dir . '/internal_data/attachments/0/' . $temp2['data_id'] . '-' . $temp2['file_hash'] . '.data';
//Destination (temporary) name
$destname = $smf_dir . '/attachments/' . $temp2['filename'];
$test = copy($oriname, $destname);

d) perform some SMF-specific hash/rename operations and add it to SMF's attachments table.

That's it.
If the file copy operation fails, that's because the file cannot be found. In order to check that I need to see in place which files are in place and where they are located.
The post body content isn't really touched. So it seems that XF is using some kind of "inline attachments" to show the image through a BB Code that SMF can't understand. That might be "convertible" but I am really not sure, I need to check in place.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

sc4t

Thank you! I give you the password via private message  :)

sc4t


sc4t

Hello Margarett

You new to the script ??

Refaeliadria

Quick question and for some reason I can't remember how to define the root directory for the xenforo install.

margarett

Quote from: margarett on October 06, 2013, 05:09:45 PM

How to use this converter:
(...)
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 :P ). 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.

It's the variable $xf_dir
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

sudeep10

anyone can help me out. I want to update from xenforo to smf.
I can pay for the right solution as well.
I am a noob when it comes to programming and coding, It just pass away from my mind.
Anyone can help me out?

margarett

Did you try to run the converter? Do you get any errors?

What is your XF version?
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Marzia

does this work for xenforo 1.5.10? I want to move to SMF instead since xenforo keeps giving us problems... .-.

sc4t


Hello margarett!
What's new for the conversion script xenforo 1.5.10??

wEbAddEr

#155
The import script works all the way but when it start to import the posts it gives a error:
xenForo 1.5.10

An Error Has Occurred!
The database value you're trying to insert does not exist: id_board

novice68

I know this is an old thread, but I have a question on the converter.

I'm an active mod on a forum that has about 1500 registered users and over 15,000 posts. The current forum owner wants to 'retire' but needs to keep the domain for professional reasons. He offered to shift the existing forum to one of the mods, if we wanted to take it on, and I decided to give it a try. He currently uses Xenforo but I'd prefer to try SMF. I have a new domain and hosting set up already. I also have SMF installed along with this converter. From the instructions, it looks like I only need the current xenforo database and not a full install of xenforo. I believe I can put the xenforo database anywhere as long as I link to the path. Is this a correct assumption? Or do I need to install xenforo in order for this converter to function correctly?

Questions regarding conversion:
Quote3.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.

What number am I entering for this step: I'm not sure what the queries represents, is it number of users, posts, or some code detail that I don't understand?

Quote3.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.

I asked for a copy of the current database to test it and he sent me a file called xenforo.sql. Is this the correct file to use? If so, do I need to rename it xf.sql? Or should I request a different file type?

Thank you for any help you can provide.

Christa

Illori

do you have a web server? you need to upload the backup to the database server. you would also need whatever xf's version of Settings.php is that will let SMF connect to the database.

novice68

I do have a web server. I suspected I needed a php file as well but didn't see it specifically listed in the instructions.

Sorry for the simplistic questions. As you can tell, I don't write code and I only have a very (VERY) basic understanding of files and structures and how they link.

GigaWatt

Quote from: novice68 on May 07, 2018, 10:13:12 AM
I asked for a copy of the current database to test it and he sent me a file called xenforo.sql. Is this the correct file to use? If so, do I need to rename it xf.sql? Or should I request a different file type?

I don't know the answer to your first question (try reading the thread, there might be an answer there), but to your second one, yes, that's the forum's database. I suggest you zip it when uploading it through the database manager (phpMyAdmin). The files usually have to end with .sql.zip. For example, if you zip the xenoforo.sql database, your file should be named xenoforo.sql.zip.

You could name it however you like, as long as the name is not too long and it doesn't contain special characters (i.e., regular ANSI letters and numbers are allowed).

Quote from: novice68 on May 07, 2018, 11:40:29 AM
I do have a web server. I suspected I needed a php file as well but didn't see it specifically listed in the instructions.

There's an attachment in the first post in the thread, xf2smf.ZIP. Download it, extract the content and use the xf2smf.php file.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Advertisement: