You can refer to the import scripts I used. The file you want to see is this: xenforo_import_enhanced.rb