MG 1.1 Import from vBulletin, convert attachment to media

rhs

Active member
Hi,

I have transfer a vB 4.2 forum to XF with some problems. One is this ...

Thread:
http://www.kastenwagenforum.de/forum/threads/fahrerhausvorhang-roadcamp.29840/

Broken image link from one image:
[IMG]http://forum.kastenwagenforum.de/attachment.php?attachmentid=62599&d=1466030002[/IMG]

The correct image link is now:
[IMG]http://www.kastenwagenforum.de/forum/media/fv01.21800/full[/IMG]

You see, I have switched from forum.kastenwagenforum.de (vB) to www.kastenwagenforum.de/forum (XF). This can corrected with a regexp replace, but what should I do with the old image id and the new media id?

I have a table archived_import_log_xmg with old and new ids (62599 => 21800). But how can I replace this ids?

Thanks!
 
The main problem here is you haven't retained the IDs so implementing a solution for this requires some sort of map between the old content IDs and the new.

If performing the import again isn't an option then you will need to either update these manually or implement a custom solution that takes control of this.

One way to handle this is to have all of the original files still accessible. The images and PHP files etc. So that the files can still be served. This is clearly quite a cost in terms of disk space and complexity, so there's another solution.

There are add ons available that can scan all of your posts for IMG tags and convert these images to new attachments within the XF attachment system.

Once run, this would update all the posts so they are now pointing directly at images in the attachment system. At this point you can then delete or archive off your old installation, and the files will still be served from directly within XF.

Again this isn't ideal but it's less duplicative than just keeping all the files there.
 
The main problem here is you haven't retained the IDs
Yes, but that is by design from the xf importer ... It lacks a step for step guidance on how to approach such an import best. Questions are always coming here ...

MetaMirror is for import external images to XF. I have the images already in the media gallery and must "only" changes the links with help from my transfer table archived_import_log_xmg. Is there no tool / programming example for that?
 
It should go without saying that a process such as this should be planned with detail. Certainly if you're unsure of how to best approach an import, you should ask before doing it. It's also recommend to do the import in a testing environment first, specifically so issues such as this can be worked out before it's too late.

MetaMirror and the other add-on I mentioned function in the same way. I know that people have solved similar challenges using such add-ons before, hence why I recommended them. If you're unsure how to proceed, you should ask the authors of the respective add-ons for advice.

If the content IDs were not different, you could use the Post Content Find and Replace Tool to do a regex replacement on all of your posts which would enable you to change the URLs from the old format to the new format.

What you may need to do instead is look at the code in redirection scripts such as this and modify them so that requests to attachment.php are re-routed to the correct URLs:

https://xenforo.com/community/resources/redirection-scripts-for-photopost-vbgallery.4274/

This will require some level of PHP experience.
 
It should go without saying that a process such as this should be planned with detail. Certainly if you're unsure of how to best approach an import, you should ask before doing it. It's also recommend to do the import in a testing environment first, specifically so issues such as this can be worked out before it's too late.
Yes, yes ... Lock at my old ticket with the broken image. You help me on the way, but I can't check the whole forum post after a test import. You see much things only afterwards ... should be known to you.

Ok, thanks, i will look at the php examples. PHP experience is no problem ... We can do it ;).
 
@Chris D : one question ...

In a post I can link direct to image from the media gallery:
http://www.kastenwagenforum.de/forum/media/21800/full

How can I link direct to normal attachment (from other post)?
http://www.kastenwagenforum.de/forum/attachments/12345 show the wrong image ...
 
I'm not totally sure I follow the question.

If it is a media item and you have a media ID then you would use the first style link.

If it is an attachment and you have an attachment ID then you would use the second style link.

Media IDs and Attachment IDs aren't the same thing.
 
Back
Top Bottom