Page 1 of 1

Importing from MT

Posted: Tue Oct 09, 2007 5:49 pm
by Zirbelholz
Hi,

I have some questions about importing from MT (www.margaret-marks.com/Transblawg to www.transblawg.eu).

The problem is that I can't get to grips with this till the weekend, and sometimes it's hard to get help at weekends. So these are general questions in advance.

I have 2522 entries over a period of more than four years, and 5247 comments.

As for the URLs and the photos, I know that's a problem. I am happy to sort out the pictures in the coming months. I presume there will be a sort of placeholder showing that 'there should have been a photo here'.

As for the entries, I can export those by RSS, I hope.

But what is the procedure with the comments? I am not sure if I can get an RSS feed for those - I know such feeds exist - and if I do, will the comments be linked to the correct posts? Or should I treat comments like photos and gradually put them in myself, leaving the boring ones out?

TIA
Margaret

Re: Importing from MT

Posted: Wed Oct 10, 2007 10:47 am
by garvinhicking
Hi!

Actually, when you import a blog entry, you import its full HTML source. So in there, there should be an <img> reference. Thsi is not imported as a placeholder, you must keep the URL inside the <img src> intact to be able to still view the images.

Otherwise, you must upload all the pictures to your new blog and then adjust every entry with the new src-location. You might be able to do that via automatic search+replace by exporting your serendipity_entries database table as an SQL dump, editing that file, and then re-importing the SQL dump.

s9y has a MT importer which works on the MT export data format. Comments, entry body and category association is imported with that.

So, using the RSS import is always a last resort. You can only import entries with it, not comments. If you import a comment RSS feed, the comments will get saved as serendipity entries.

Regards,
Garvin

Posted: Wed Oct 10, 2007 11:06 am
by Zirbelholz
Thanks, Garvin, that's excellent. I didn't realize there was an import specifically for MT. I probably read in an outdated comparison of blog software that only RSS export/import was possible.

The image files are all in a directory I created under my current URL. However, I'm moving the URL and losing all my inbound and internal links, because I decided it was my best option, for all the problems it creates. I suppose I can't make a global change of directory in the current MT blog? (no, I can't ask you that) Well, the problem you describe is what I was expecting.

When you say 'not a placeholder', what will the orphaned link look like - a bit of html code?

Regards
Margaret

Posted: Wed Oct 10, 2007 11:56 am
by garvinhicking
Hi!
The image files are all in a directory I created under my current URL. However, I'm moving the URL and losing all my inbound and internal links, because I decided it was my best option, for all the problems it creates. I suppose I can't make a global change of directory in the current MT blog? (no, I can't ask you that) Well, the problem you describe is what I was expecting.
Sadly not. You'll have to use the search+replace method I mentioned to change all occurences of your links to the new one, unless you entered all your links relatively and the directory on the new server is the same than before (both in / for example, or both in /blog).

I don't know MT enough so I can't tell you if when you change the path configuration there, if it alters the paths in your entries. s9y doesn't do that, because it'S rather complex. So I think that MT won't do it either.
When you say 'not a placeholder', what will the orphaned link look like - a bit of html code?
If your entry body in MT contians this:

Code: Select all

<a href="http://www.youroldblog.com/"><img src="http://www.youroldblog.com/pic.gif" /></a>
and you import it to s9y, it will still look the same. So if you remove www.youroldblog.com, you'll see a broken link and broken image in your entry, unless you replace the s9y entry to:

Code: Select all

<a href="http://www.yournewblog.com/"><img src="http://www.yournewblog.com/pic.gif" /></a>
Regards,
Garvin

Posted: Wed Oct 10, 2007 12:27 pm
by Zirbelholz
Thanks, excellent information.

Actually, the links will work for the time being, as the old blog will not be deleted till I am ready. Then I am moving the domain www.margaret-marks.com and keeping it for a while, so I can actually set up the same directory on the new server, which gives me breathing space to change what I want before I let the domain name go. I have a feeling that I won't want to try out the SQL dump idea.