vB as an import intermediate, share your experiences

Sadly I seem to have lost all of my attachments too going phpBB -> vB -> XF

ImpEx is broken IMHO. I can't get attachments from SMF to vB. SMF stores attachments in a strange way--they create a hash of the original filename, and rename the file with the hash (using no extension). The original filename is stored in a table with the hash.

I quickly wrote a utility that copied those hashed filenames back to their originals. Really simple actually. But now, to fix ImpEx...I can't make heads nor tails out of it. ImpEx thinks the filename hash is created using md5("$filename") where SMF 2.0 actually does it as sha1(md5($filename . $time() . $mtime() )). In other words, a timestamp based on when the attachment was created. Nothing that ImpEx can recreate IOW. I don't know why ImpEx is making it overly difficult. If I can find a way for ImpEx to just use the original filename along with the attachment ID (forgetting the hash nonsense), I think I could actually pull this off. OOP in PHP is not exactly my forté as of yet.
 
So far, I am finding out the following regarding converting from SMF2 --> vB3.8 --> XF1:
Just throwing this out there ... does the is the IMPEX for SMF 1 better ?
Could you go SMF2 -> SMF1 then vB3 then XF1 ?

1) User avatars do not import; (no biggie)
2) Post attachments do not import; (ouch)
3) Passwords will not transfer; (ouch)
 
I'm not sure, but I don't know if the SMF1 ImpEx module would work properly, as a few things have changed in SMF2 vs. SMF1.

I did finally have some success though, in the past few minutes! I first converted all the attachment filenames to normal (away from the hashed nonsense), and made one change in Impex so it uses the original filename straight out of the database table. It seemed to get most of the post attachments. As I was storing avatars in the attachments directory, those did not convert...so, no big deal there. I am still trying to get avatars to import (module 004), but can't make rhyme nor reason out of it. Still trying though! But, that's not a huge deal since XF avatars are all square, vs. both rectangular and square in SMF. Members may want to upload.

Passwords will never convert, so I'm not even pursuing that. Only thing I could ever do is modify XF to use the old SMF password scheme, and that would probably get overwritten with each XF update. Not worth the hassle.

The cleaner.php file actually worked, but I found a better set of replacements I'm going to try.

Smilies? I have 300+ on our SMF board. I wrote a smiley converter in PHP that only copies the smiley table from SMF directly to XF. It works, but it is also making me clean up our smilies quite a bit, which was a much-needed chore.

I will tweak some more, then take notes while I do a final trial import. And, I'll report back here with what I did.
 
Create your own authentication scheme, that way it won't get overwritten. In reality, it's just one file that you have to remember to delete from the upgrade package.
 
Update.

Attachments are fixed.
It was FileZilla (again) causing problems as phpBB stores attachments with a file name without an extension so FZ was transferring them as ASCII.
I disabled that and now most of my attachments work.

Poll results however are totally messed up :D
 
Well, I was hoping to do one final test run, but I am still encountering difficulties.

The good news: I am successfully importing most of my problematic items from SMF to vB. The attachments I was able to save are working properly in vB: if I click on a non-image file (such as a .torrent file), the file downloads in the browser. In XF, however, I get an error when I click on the filename, no matter if it's an image or other file type:

The webpage at http://66.0.0.0/aaa_xf/index.php?attachments/crv_200000_b-jpg.1/ might be temporarily down or it may have moved permanently to a new web address.

For images, too, the lightbox is not opening when I click on a thumbnail. Although, I have not gone through any of the setup in XF's admin control panel as of yet.

One issue I am having, though, is that JS is acting screwy on our server, so that may be the root cause of the issues above. I'm running my conversions on our dedicated server, and had some other JS-related issues that may be a result of my caching and/or file protections in .htaccess. The forum will be moved to our shared server once I'm done with conversions.

One other thing I ran into though: in SMF, some of the IMG tags are broken. When you post in the WYSIWYG editor in SMF, an ALT attribute is added to the IMG tag. So, when you import SMF to VB, that tag remains. Since I finally got cleaner.php to clean up the quote tags from SMF to VB, I am going to add code to clean up all IMG tags so they are just a generic [ IMG ] tag.

Last bugaboo: the quote BBCode works correct in VB, but when I import to XF, the post number from VB shows after the name in the quoted text. So, the quotes are displaying correctly within the posts, but in addition to the username is the original VB post number, separated with a semicolon. Such as "darkmatter;2401" rather than just "darkmatter". Personally I don't think users care all that much to hop back to their original post, so I may just modify cleaner.php to clean up and use the generic [ QUOTE ] BBCode rather than try to include a link back to the original post.

That's what I've encountered today. Once I work these out I think we'll be golden!
 
Final run-through. Moved the XF files to the shared server, and all the JS stuff works now. Yay!

Attachments, lightbox for images and downloads for images, work fine.

Wrote a bit of code to fix SMF's extended IMG tags, and added to vB's cleaner.php file (part of ImpEx). I have updated the thread over at vB.com with the additional function and code, which is linked in the first post in our current thread here.

And, tried this to convert vB's quote tags to XF's, and they work fine:

http://xenforo.com/community/threads/vbulletin-and-possibly-others-to-xenforo-quotes-converter.7130/

Think I'm ready to do a live conversion now!
 
Top Bottom