Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

vBulletin Attachments

agcyphersagcyphers Nooooop.
edited November 2015 in Vanilla 2.0 - 2.8

How are vBulletin attachments exported for Vanilla? I see the "attachments" directory in the uploads folder, but there doesn't seem to be any discernible rhyme to the structure.

Essentially, I'm trying to resolve some BBCode from vBulletin to IMG tags for Vanilla. The BBCode looks like this:

[ATTACH=CONFIG]1169[/ATTACH][ATTACH=CONFIG]1170[/ATTACH][ATTACH=CONFIG]1171[/ATTACH][ATTACH=CONFIG]1172[/ATTACH]

Comments

  • To import avatars and attachments you have to append ?avatars=1&files=1filepath=/path/to/attachments to the porter URL.

    See http://docs.vanillaforums.com/developers/importing/porter/#attachments

  • agcyphersagcyphers Nooooop.
    edited November 2015

    OK, I did this import quite some time ago, so I'm not certain I exported using these flags. I remember thinking at the time that I'd do it all, so I'd have all data. In the attachments directory in the uploads folder, they are usually 4 levels deep and contain a .attach file and a .thumb file. If I have erroneously exported, is there any way to recover now? I assume I could rename all of the .attach files to a valid image extension, then put all of them in one directory and modify my ATTACH tags to match. Would this work? Do you know of a better way?

  • If I have erroneously exported, is there any way to recover now?

    Not that I know of. I assume the import happened some time ago and there has been activity on the forum since?

    What file upload plugin have you been using on vanilla?

    If your Gdn_Media table is empty (if have not used the file upload or advanced editor plugin at all), you could import your vBulletin forum a second time on a local machine with the correct settings. This would rename the files and create the media table for you.

    You could then copy over the renamed files and import the media table manually (e.g. using phpMyAdmin) to your production site.

  • agcyphersagcyphers Nooooop.

    Yes, there has been a lot of activity since the import.

    I did a test, and wrote a small app to extract all of the .attach files and rename to .png. I now have all of the attachments in image format. Using this, I think I'll be able to update the database to switch out those ATTACH BBCode tags with html IMG tags. Thanks for the help!

  • agcyphersagcyphers Nooooop.

    Ah, but there is a gotcha. These IDs don't match the vBulletin attachment IDs. Weak sauce.

  • agcyphersagcyphers Nooooop.

    I have solved this by sorting through the 1300+ images and posting them myself. Took a while, but they're up now.

Sign In or Register to comment.