achapman

Export template that will publish drafts?

Vote 0 Votes

Hi, I have been trying to export my blog entries using the regular blog export tool, but it times out after exporting about 200 entries. I created an export template and published that instead, which is great, except that it left out all drafts. How can I export my drafts?

Here's the template I published, and am wondering what I need to add here to get the drafts included (I put the lastn as 600 because I have less than that on my blog but wanted to make sure all were included):

<MTEntries lastn="600">
AUTHOR: <$MTEntryAuthor strip_linefeeds="1"$>
TITLE: <$MTEntryTitle strip_linefeeds="1"$>
BASENAME: <$MTEntryBasename$>
STATUS: <$MTEntryStatus strip_linefeeds="1"$>
ALLOW COMMENTS: <$MTEntryFlag flag="allow_comments"$>
CONVERT BREAKS: <$MTEntryFlag flag="convert_breaks"$>
ALLOW PINGS: <$MTEntryFlag flag="allow_pings"$>
<MTIfNonEmpty tag="MTEntryCategory">PRIMARY CATEGORY: <$MTEntryCategory$>
</MTIfNonEmpty><MTEntryCategories>
CATEGORY: <$MTCategoryLabel$>
</MTEntryCategories>
DATE: <$MTEntryDate format="%m/%d/%Y %I:%M:%S %p"$>
-----
BODY:
<$MTEntryBody convert_breaks="0"$>
-----
EXTENDED BODY:
<$MTEntryMore convert_breaks="0"$>
-----
EXCERPT:
<$MTEntryExcerpt no_generate="1" convert_breaks="0"$>
-----
KEYWORDS:
<$MTEntryKeywords$>
-----
<MTComments>
COMMENT:
AUTHOR: <$MTCommentAuthor strip_linefeeds="1"$>
EMAIL: <$MTCommentEmail strip_linefeeds="1"$>
IP: <$MTCommentIP strip_linefeeds="1"$>
URL: <$MTCommentURL strip_linefeeds="1"$>
DATE: <$MTCommentDate format="%m/%d/%Y %I:%M:%S %p"$>
<$MTCommentBody convert_breaks="0"$>
-----
</MTComments>
--------
</MTEntries>

Thanks!

Reported on Movable Type 4.3

3 Replies

| Add a Reply
  • A way to export your draft posts is to use the Brad's SQL plugin available at:

    http://plugins.movabletype.org/sql/

    Kind Regards,
    Mihai Bocsaru

    ----------------------------------
    Daily Movable Type Consultant

    Web Development
    Movable Type Consulting
    Six Apart Partner

    http://www.pro-it-service.com/
    ----------------------------------

    Movable Type Demo
    http://www.movabletypedemo.org/
    ----------------------------------

    Open Melody Demo
    http://www.openmelodydemo.org/

  • Thank you Mihai, that is helpful and I took a look at it - but it is a little over my understanding, and would probably take me several hours to figure out how to use it properly.

    Does anyone have any examples of how to use this as an export template? Or perhaps hints about why the MT export tool only exports the first 200 entries and how to change that?

    Thanks!
    Amy

  • Hi Amy,

    In order to export also the draft posts, you could use the following coding to surround your export template:

    <mt:SQLEntries query="select entry_id from mt_entry">
    ...your export template here...
    </mt:SQLEntries>

    You would use this with the mtSQL plugin I've recommended above.

    Kind Regards,
    Mihai Bocsaru

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

code.sixapart.com

137 479

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

238 797

Last Topic: Manifest Schema Compatibility Issue When Restoring Blog by Matt on Oct 17, 2012

1858 6594

Last Topic: Categories and Basename Publishing Issues by e21media on Oct 25, 2012

88 307

Last Topic: absolute publish date in Manage Entries screen by .mau. on Apr 18, 2012

1488 5347

Last Topic: Anti-cloning by .mau. on Oct 29, 2012

732 3093

Last Topic: Blog moved server - now users cannot access blog? by mowgs on Oct 30, 2012

89 317

Last Topic: How to "pretify" a url in htaccess with a few wildcards by Caio on May 30, 2012

183 771

Last Topic: Commenting with TypePad by Rob Ferrara on Oct 17, 2012

212 680

Last Topic: Does MT-Approval work in MT5? by DLpres on Sep 25, 2012

27 100

Last Topic: Upgrading MT by Caio on Oct 15, 2012

49 224

Last Topic: Movable Type 6 Ideas by Caio on May 28, 2012

65 248

Last Topic: Expanding new rich text editor and implementing table function by Takeshi Nick Osanai on Jul 30, 2012