For those of you with multiple MT weblogs, have you ever wanted to move an entry from one blog to another? or the entries from only one category from one to another weblog? You can copy the entries from the first weblog and paste them into the second, but how to move the associated comments or trackbacks?
Here's one fairly straightforward method. Note that subcategories will not transfer over using this method due to limitations of MT.
1. Create a new index template in the weblog that contains the entries you wish to move. Give the template name any name you wish. Call the output file mt.txt. Copy and paste the following code into the new index template:
<MTEntries lastn="1000" sort_order="ascend" category="Your Category Name Goes Here">
ALLOW COMMENTS: <$MTEntryFlag flag="allow_comments"$>
CONVERT BREAKS: <$MTEntryFlag flag="convert_breaks"$>
ALLOW PINGS: <$MTEntryFlag flag="allow_pings"$>
PRIMARY CATEGORY: <$MTEntryCategory$>
DATE: <$MTEntryDate format="%m/%d/%Y %I:%M:%S %p"$>
<$MTEntryExcerpt no_generate="1" convert_breaks="0"$>
DATE: <$MTCommentDate format="%m/%d/%Y %I:%M:%S %p"$>
BLOG NAME: <$MTPingBlogName$>
DATE: <$MTPingDate format="%m/%d/%Y %I:%M:%S %p"$>
Change the "Your Category Goes Here" in the first line to the name of the category whose entries you want to move. If you only want to move one entry, create a new category just for that entry and make it the primary category for that entry. If you want to move entries from multiple categories, separate the categories with "OR" like so: category="Category1 OR Category2 OR Category3".
Save and rebuild the template.
2. Using an FTP program, retrieve the mt.txt file you just created from your weblog directory on your server. (You might want to check it in a text editor, to make sure that the data is there.) In the same directory where the mt.cgi file resides, create a new directory called, "import" and place the mt.text file you just created inside.
3. Open up the weblog edit window for the target weblog into which you want the entries moved. At this point it is a good idea to review the importing instructions in the MT Manual. When you are ready, click on the "Import/Export" button on the left side of the edit screen. Then click the "Import Entries" button. When the import is complete, click REBUILD. View your site. Note that unless you set the Default Post Status to "Publish" in your weblog config, all your imported entries will come in as drafts.
4. Remove the mt.txt file from the import folder you created on your server so that if you run the import process again at a later date, the entries you just imported will not be re-imported.
5. Assuming that all has worked and the entries are now in the target weblog, you can delete the entries from the source weblog. In addition to deleting the entries from the weblog edit window, you may also want to delete the files from your server using an FTP program. I tend to keep the files on my server because others may be linking to them and I don't want to create broken links. However, in this case, I close all of the comments and trackbacks of the entries and save the entries before deleting them in the weblog edit window.