Movable Type User Manual


ABOUT MOVABLE TYPE

Movable Type (http://www.movabletype.org/) is a web-based personal publishing system. It is designed to ease maintenance of regularly-updated news or journal sites, like weblogs. It contains features common to many other such systems (hosted locally on your server, template-driven, highly-configurable, permalinks, etc.); in addition, it also includes support for the following features:


COPYRIGHT & USAGE

Movable Type is Copyright 2001, 2002 Mena G. Trott and Benjamin Trott. All rights reserved.


INSTALLATION & REQUIREMENTS

Please see the document mtinstall.html for information on installing Movable Type.


BLOGS

The Movable Type system supports multiple blogs. A blog is simply a collection of entries, templates, and everything else you see on the blog Editing Menu.

You can create a new blog (if you have blog-creation privileges, that is) by logging in to Movable Type, then clicking Create New Blog. Fill in the configuration information, then press SAVE; you will automatically be assigned full permissions for this new blog.

You can edit the configuration of an existing blog by logging in to Movable Type, selecting the blog you wish to configure from Your existing blogs, then clicking Edit Blog Configuration.

Creating a New Blog

When creating a new blog, you will need to perform the following steps:

  1. Create the directory where your weblog will be stored. If you wish to store your archive files in a directory other than your main weblog directory, create a directory to hold your archives, as well. Set the permissions (CHMOD) of both directories to 777. (For instructions in creating these directories, take a look at the Installation Instructions in the section Setting up your Blog Directories.

  2. In the Main Menu, click Create New Blog; then configure your blog in the standard blog configuration screen. When you are done with your blog configuration, press SAVE.

    Don't rebuild yet; wait until you've posted your first entry (in Step 4).

  3. By default your blog will be created with a complete set of working templates; you can customize these now in the List & Edit Templates screen, if you'd like.

  4. Test your blog by creating an entry, then commenting on it. You can also rebuild all of your files to test out the rebuild features.

  5. Tell everyone about your new blog!

Blog Configuration

Movable Type supports many options for configuring the way your blog works. These options can be set on the Edit Blog Configuration screen, where each option is explained briefly. Some options require more explanation, however:


ENTRIES

Entries form the basis of your blog; they are the content, whereas the templates (below) generally define how that content appears. You can create a new entry by logging in to Movable Type, selecting a blog, then clicking Create New Entry. You can edit your existing entries by clicking List & Edit Entries, then selecting an entry from that list.

When creating a new entry, you will have the chance to set the following fields:

You can use the PREVIEW button to preview your entry before posting; CANCEL will return you to the List Entries page.

After you have saved a new entry, you will be transferred directly into editing mode for that entry. When editing an existing entry, you will have several new options:

Note that, upon saving an entry that is marked for Release, your archives for that entry, along with all of your indexes, are automatically rebuilt. Thus you do not need to manually rebuild your files (see REBUILDING FILES, below) after posting a new entry, or after editing an existing entry.

Entry-Editing Shortcuts

If you are using Movable Type on Internet Explorer for Windows, you can make use of a couple of keyboard shortcuts while editing your entries, to automatically insert HTML formatting tags. To use these shortcuts, select the text you wish to format in your entry, then press the appropriate keyboard shortcut combination:

Search and Replace

You can use Movable Type's search and replace functionality either to search through all of your entries for a particular string, or to replace all instances of a string with another string. IMPORTANT: there is no undo feature, so be careful when you use the replace functionality; because of this you may want to export your Movable Type entries before using replace, for backup purposes.

You have the following options when using search and replace:


ARCHIVING

Movable Type supports many archiving options: you can archive by date (daily, weekly, or monthly), by category, or by individual entry. This last option means that each entry will be placed on its own page. Each blog can use multiple archive frequencies and types; for example, your blog could use Daily, Monthly, and Category archiving. Archive types are selected in the Edit Blog Configuration screen, or can be chosen when creating a new blog. Be aware, however, that the more archive options you choose for a particular blog, the longer it will take to rebuild your files (Rebuild).

If you do select multiple archive options, you must select a preferred archive type. The preferred archive type is used when constructing links to your entries--for permalinks, for example. A link can only point to one possible archive type; to set this type, set your Preferred Archive Type in the Edit Blog Configuration screen.

You will need to create templates for each of your archive types. See TEMPLATES, below, for information on which templates apply to which archive types.

No matter what type of archiving you use, you will likely wish to create a master list of all of your archives. In Movable Type, a master archive index is just a regular index template; however, instead of using the MTEntries tag--as you do with most other index templates--you instead use the MTArchiveList tag. This tag, and associated tags for use with creating a master archive index, are described in TEMPLATE TAGS, in the Master Archive Index section.


COMMENTS

Movable Type features a built-in comment system. You can edit existing comments for a particular entry by selecting that entry for editing, then looking in the Edit Comments area. Comments will be listed there; you can edit a comment by clicking on the name of the author, then editing the comment on the resulting page. You can delete comments by checking their checkboxes, then clicking DELETE CHECKED.

The default templates that ship with Movable Type are comment-ready; in other words, you should be able to use comments in your blog without editing any of the comment templates at all. The default templates are set up so that comments appear on both the popup comment window (linked from the Main Index template) and the individual archive pages. You can alter this behavior by altering the appropriate templates.

Movable Type's comment system can be used in either of two ways (or both):

Of course, in either of these scenarios, you will also want to provide a form for users to enter new comments. That form can look something like this:

    <form method="post" action="<$MTCGIPath$>mt-comments.cgi">
    <input type="hidden" name="entry_id" value="<$MTEntryID$>">
    Name: <input name="author"><p>
    Email Address: <input name="email"><p>
    URL: <input name="url"><p>
    Body: <textarea name="text" rows="10" cols="50"></textarea><p>
    <input type="submit" name="preview" value="PREVIEW">
    <input type="submit" name="post" value="POST">
    </form>

If you are using static/inline comments, note that the sample form above will require the addition of one more hidden input field:

    <input type="hidden" name="static" value="1">

This tells the comments system that you are using inline comments, which will force a rebuild of the entry archives and of the index pages for your blog, after a new comment is posted.

Note that in either scenario--inline comments or popup comments--your index pages will be rebuilt after a new comment is added; this is to update the count of the number of comments on the entry (see the MTEntryCommentCount tag, in TEMPLATE TAGS, below). In addition, if you are using inline comments, your archive pages for the entry will be rebuilt; this is to add the new comment to your individual entry archive page for the entry.

Comment Previewing

Comment previews are built into Movable Type, so that your visitors can preview their comments before posting. Support for previews ships with the default templates built into the system; you can remove this support, if you wish, by removing the PREVIEW button from the comments form. The layout of the comment previews is defined using the Comment Preview template. You can use the <$MTCommentPreview*$> tags, along with the global tag attribute encode_html, to create an editable comment preview form; this allows users to preview their comment, then edit the comment being previewed, then post the comment. The default templates have an example of an editable comment preview template.

When creating an editable comment preview template, you should always paste this hidden input field into the forms in your Comment Preview and Comment Error templates:

    <input type="hidden" name="static" value="<$MTCommentPreviewIsStatic$>">

This is a magical tag that tells the system whether a user is posting a comment from your individual archives, or from the comment popup window, so that the user can be redirected to the proper page after posting a comment.

You can also list all of the previous comments posted to the entry, using the standard <MTComments> container tag:

    Previous comments:
    <MTComments>
    <$MTCommentBody$>
    Posted by <$MTCommentAuthorLink$> at <$MTCommentDate$>
    </MTComments>

Comment Submission Errors

If an error occurs when a comment is submitted--for example, if you have disallowed anonymous comments, and the user does not supply a name or email address--you can customize the error page that the user receives using the Comment Error Template. You can use this template to provide a form where users can fix whatever error has occurred in their submissions, then re-post (or preview) the comment. The default templates have an example of a Comment Error Template ( http://www.movabletype.org/default-templates.html ).


TEMPLATES

Templates in the Movable Type system are your method of defining the design and layout of your site. Templates describe where you want your content (that is, your entries and archives), what that content should look like, and so on. Generally your templates will be made up of HTML, interspersed with Movable Type template tags and variables (see TEMPLATE TAGS, below), but this is not a technical limitation; you can use Movable Type to generate plain text, HTML with server-side includes, PHP, and any other text-based language.

You can edit your blog's templates, and define new templates, by logging in to Movable Type, selecting a blog, then clicking List & Edit Templates.

There are several different types of templates in Movable Type.

Index Templates

Index templates are your main entry listings. Unlike many other weblog management systems, Movable Type supports multiple index templates; this means that you can publish your main entry listings in several formats, for example, like one listing in HTML, and one in XML. By default, an index template displays the last N days worth of entries, where N is defined in your blog configuration. For example, if you set the number of days displayed on the index to 7, Movable Type will, by default, display all entries from the last 7 days on all of your index templates. Note that 7 days means the last 7 consecutive days, not necessarily the last 7 days on which you posted an entry. So if you have posted on just 3 of the last 7 days, only the posts from those 3 days will be listed on your main indexes.

As mentioned above, displaying the last N days of entries is the default behavior for index templates; this behavior is customizable, however, through the MTEntries tag (see below); for example, you might set your RSS index (for RSS syndication) to display your last 15 entries, no matter the date.

Archive Templates

Archive templates define the look and feel or your blog archives. Since Movable Type allows for several different types of archiving (see Archiving, above), there are several equivalent types of archive templates:

Template Modules

Movable Type allows you to extract common chunks of HTML code into templates that you can then include in your other templates; in Movable Type, these common templates are called Template Modules. An example of the use for such a template might be a header that you use throughout your site. You can create a new template module called Header, paste in the common header code, then save the new template. You can then include this code in all of your other templates using the MTInclude tag:

    <$MTInclude module="Header"$>

This tag will be replaced by the contents of the Header custom template.

This allows you to keep all common code in one place, so that if you need to modify it, you only need to modify it in one place.

Miscellaneous Templates

These are the templates that don't fit as Index Templates, Archive Templates, or Custom Templates. Currently, the templates in this category are:

Editing a Template

After selecting a template to edit in the List & Edit Templates screen--either by clicking on the name of an index template or a template module, or by clicking the EDIT button for the archive or miscellaneous templates--you will be presented with the Edit Template screen. Depending on the type of template you are editing, or whether you are editing a template module, the template-editing screen will differ slightly in appearance. For example, only on an Index Template will you be able to assign an Output file.

Here are the fields you may be presented with on the Edit Template screen:

Default Templates

Movable Type ships with a set of default templates that are customizable through stylesheets; the same template markup can be made to look completely different by inserting a new stylesheet. You can view the default templates themselves at http://www.movabletype.org/default-templates.html .

To select a new style for your blog, follow these instructions:

  1. Log in to Movable Type, select the blog you wish to edit, then click List & Edit Templates.

  2. In the list of Index Templates, you will see a template called Stylesheet; open this template for editing.

  3. The prebuilt stylesheets used to customize your pages are located at http://www.movabletype.org/default-styles.html . On this page, you can view screenshots of each style; once you have selected the style you wish to use, copy the contents of the text box, and paste those contents into the Template body box of the template you opened for editing in Step 2.

  4. Press the SAVE button to save the new stylesheet.

  5. You will be prompted to rebuild your site; click the REBUILD link, select Rebuild Indexes Only from the pulldown menu, and click the REBUILD button.

  6. When the rebuild has completed, your site will now be using the new stylesheet.

    NOTE: some browsers (Internet Explorer for Windows, for one) refuse to reload a stylesheet from the webserver once they have fetched it once; if, when you view your site, nothing has changed, you should empty your browser cache and try again.


TEMPLATE TAGS

Movable Type templates are composed of special tags embedded within standard chunks of plain text (or HTML, as the case may be). Certain tags are ``container'' tags: they contain what might be called a subtemplate, a chunk of text and MT tags between two other MT tags. Typically a container tag represents either a loop or a conditional.

Non-container tags are simple variable tags: they are placeholders for dynamic pieces of information.

All Movable Type tags are enclosed within less-than greater-than signs, just like HTML tags. You can optionally insert a $ inside these signs, like this:

    <$MTEntryBody$>

This can be useful to quickly determine whether a particular tag is an HTML tag or a Movable Type tag.

Movable Type tags take attributes to modify their behavior. Tag attributes work similarly to HTML tag attributes: they are lists of name="value" pairs, separated by spaces. For example:

    <MTEntries author="Foo" category="Bar">

(Look at the MTEntries documentation to determine what this does.)

Attribute values must be enclosed in quotes; otherwise they will not be parsed correctly. When using attributes in a tag where you are using the $ character after the start and before the end tags, you should place the attributes before the end $ character. For example:

    <$MTEntryDate format="%B %e, %Y"$>

Some tag attributes are global; they apply to all Movable Type variable substitution tags. Global attributes are discussed below in Global Tag Attributes. Other attributes are tag-specific; they apply only to certain tags. These attributes are listed along with the tags that they apply to, below.

Some Movable Type tags are context-sensitive. For example, it only makes sense to use an MTComments tag in the context of a particular entry: for example, in a Comments Popup template, or in an archive template designed for use with Individual entry archives.

Blog Data

Entry Listings/Archive Pages

Comments

Comment Previewing

When creating the Comment Preview Template for use in previewing comments before they are posted to your site, you should use the following tags. All of these tags have the same meaning as the similarly-named tags in Comments, above; the only different is that these tags are used for the comment that you are previewing, whereas the others are used inside of an <MTComments> block.

Archive Templates and Master Archive Index

The following template tags and variables apply to your archive pages and to your Master Archive Index.

Calendar Display Tags

The following tags can be used to output a calendar display of your entries. The calendar display is not restricted to construction using HTML tables; the tags are sufficiently generic that you could use them to create a calendar in many different forms.

Here is the markup for a fairly standard calendar display; this will display a calendar for the current month.

    <table border="0" cellspacing="4" cellpadding="0">
    <tr>
    <td colspan="7" align="center"><$MTDate format="%B %Y"$></td>
    </tr>
    <tr>
    <td align="center">Sun</td>
    <td align="center">Mon</td>
    <td align="center">Tue</td>
    <td align="center">Wed</td>
    <td align="center">Thu</td>
    <td align="center">Fri</td>
    <td align="center">Sat</td>
    </tr>
    <MTCalendar>
    <MTCalendarWeekHeader><tr></MTCalendarWeekHeader>
    <td <MTCalendarIfToday>bgcolor="#EEEEEE"</MTCalendarIfToday> align="center">
    <MTCalendarIfEntries><MTEntries lastn="1"><a href="<$MTEntryLink$>"><$MTCalendarDay$></a></MTEntries></MTCalendarIfEntries>
    <MTCalendarIfNoEntries><$MTCalendarDay$></MTCalendarIfNoEntries>
    <MTCalendarIfBlank>&nbsp;</MTCalendarIfBlank></td>
    <MTCalendarWeekFooter></tr></MTCalendarWeekFooter>
    </MTCalendar>
    </table>

NOTE: the computation of the calendar display is relatively expensive, so if you wish to place the same calendar on every page of your site, it is advisable to create the calendar in an index template, then use server side includes or PHP (or any other dynamic webserver tool) to include that file in each of your pages.

Miscellanous Tags

These are tags which really don't fit in any of the above categories.

Global Tag Attributes

Global tag attributes can be used in any variable substitution tag (a tag that is replaced with a value--in contrast to a container tag, which ``contains'' a set of markup and other tags). However, this does not mean that they would necessarily make sense when used in any tag; it is up to the user to determine when using a particular tag attribute might not make practical sense.

You should use a global attribute just as you would use a tag-specific attribute: as a name="value" pair within the tag. For example:

    <$MTEntryExcerpt encode_html="1"$>

This will be replaced with an HTML-encoded version of the excerpt.

Here is a list of the global tag attributes:

Date Tag Formats

Movable Type uses standard strftime format strings to describe dates and times. In any date tag, you should use the format attribute to specify the format string, like this:

    <$MTDate format="%B %e, %Y %I:%M %p"$>

The above format is actually the default format, and creates a date looking like this:

    September 20, 2001 11:44 PM

Here is a list of the format specifiers.


AUTHORS AND PERMISSIONS

Each blog in the Movable Type system can have multiple authors assigned to it, with varying levels of access. Movable Type uses a role-based authorization system, meaning that you assign access to authors by enabling or disabling them from performing certain ``roles'', or actions. For example, you might have one author who you trust completely; you could assign this author full permissions, to post to your blog, edit templates, edit author permissions, edit categories, etc. You might have another author who you do not trust quite as well; you could only allow this user to post entries (and edit his own posts that he has made in the past).

To edit the permissions of an existing author, login to Movable Type, then click Add or Edit Blog Authors. Select the author name from the pulldown menu, then click EDIT. On this screen you can assign permissions on any blog for which you have author-editing permissions. You can add an author to one of your blogs by selecting that blog from the pulldown menu at the bottom, then clicking add.

You can edit your own authoring permissions by selecting your own name from the pulldown menu. Be careful when doing this, however, particularly with respect to turning off author-editing permissions for yourself. If you turn off your author-editing permissions, you will be unable to turn them back on.

To add a new author to the system, login to Movable Type, then click Add or Edit Blog Authors. In the Add an author section, enter the new author's username, email address, and website URL; then enter a password for the author. You can assign authoring privileges to the new author by selecting from the blogs listed at right, and checking the appropriate boxes.


CATEGORIES

Movable Type allows you to enter a list of categories, then assign one category to each of your entries. This allows you to keep track of your entries from a maintenance standpoint--for example, when listing your entries you can choose to list entries only from a particular category--and it can also be used to provide a categorization structure to your archives.

You can manage your list of categories in Movable Type by logging in, selecting a blog, then clicking Edit Categories. Add new categories by typing their labels into the empty text entry boxes; the system always shows five empty boxes, so if you fill up the first five, just press SAVE and you'll get five more.

You can set up category archiving in your blog configuration--select a blog, then click Edit Blog Configuration. In the Archive Configuration section, under Archive Frequency check the box next to By Category.


NOTIFICATIONS

At times, after posting a new entry, you may wish to send email to your readers, to inform them of the new entry. Movable Type makes this easy with its notification system. You can use the mt-add-notify.cgi program to provide a simple ``Notify me when new posts are added'' button, thus automating the process of adding users to your notification list. You can manage this list--either add a new address to your notification list, or delete addresses from that list--in the Edit Notifications section of Movable Type.

Notifications are never sent automatically when you post a new entry. To send a notification to your readers on a particular entry, select that entry for editing. In the Send a notification section, enter the text of the message you would like to send. You can also include the excerpt from your entry, or the entire body of your entry, by checking either of the checkboxes to the right. The message sent to your readers will include a link to the entry, followed by the message that you enter.

Movable Type comes with a simple CGI script designed to let visitors to your site add themselves to your notification list. You can use an HTML form to let visitors enter their email addresses, then submit, which will add them to the notification list. To use this script, insert this HTML code into one of your templates, where you would like the form to appear:

    <form method="post" action="<$MTCGIPath$>mt-add-notify.cgi">
    <input type="hidden" name="blog_id" value="<$MTBlogID$>">
    <input type="hidden" name="_redirect" value="<$MTBlogURL$>">
    <input name="email" size="20">
    <input type="submit" value="add">
    </form>


REBUILDING FILES

When you make changes to your templates, your configuration settings, your category names, etc., you will need to rebuild your files to see those changes reflected on your public site. Note, however, that when editing an entry, or creating a new entry, you will not need to rebuild your files: editing and creating entries automatically rebuilds the archives for that entry, and updates all of your indexes.

When you do need to rebuild your files, log in to Movable Type, select your blog, then click Rebuild Files. You have the choice of rebuilding all of your files (selected by default), or only your indexes. You will need to rebuild all of your files if you changed any of your archive templates, or if you changed configuration settings for your archives, etc. However, if the only things that you changed were your index templates, then you will only need to rebuild your indexes. Rebuilding your indexes is, of course, quite a bit faster than rebuilding all of your files.

Note that rebuilding all of your files can take a good amount of time, particularly if you are using several different types of archiving; please be patient, and do not abort the rebuilding process.


UPLOADING FILES

Movable Type offers an interface for uploading files--either images or regular files--onto your webserver for use on your site. You can upload files into either your Local Site Path or your Local Archive Path directories; in addition, you can upload files into any directory beneath those two directories.

To upload a file, log in to Movable Type, select your blog, then click Upload File. Browse your hard drive to choose the file you wish to upload. Then choose where you would like to upload the to. For example, if you are uploading an image, and you typically keep all of your images in an images directory under your Local Site Path, you should click the Local Site Path radio button, then enter images into the text box next to it. After choosing a destination for the uploaded file, click UPLOAD.

If a file with the same name already exists in the destination directory, you will have the option of overwriting the existing file; if you choose not to overwrite the existing file, the file you uploaded will be deleted, and you can then rename the file locally and upload it again, or resolve the issue in some other manner. (NOTE: if you do not receive the option to overwrite the existing file, but instead receive an error about File::Temp not being installed, take a look at the Installation Instructions, in the section If you need to install File::Temp.)

After you have uploaded a file, you have the choice of either creating a new entry using that uploaded file, or just displaying the HTML used to link to the file. For example, if you have uploaded an image, and would like to create a new entry with a link to that image in a popup window, select Create a new entry using this uploaded file, and press POPUP IMAGE. If you are already editing an entry, then you won't want to create another new entry (and perhaps lose the one that you are working on); so in that case, click the Show me the HTML button and click POPUP IMAGE. This will display the HTML code for opening the image in a popup window. You can then copy and paste this code into the entry you are editing.


IMPORTING YOUR ENTRIES

Movable Type allows you to import your entries from other weblog content management systems. If you are importing from Greymatter, Movable Type also allows you to import all of the comments on your entries into your new blog. This can be useful when you wish to start using Movable Type but already have much of your content in another system. To do this, you will first need to export your data from the other system; you can do this using the other system's standard templating functionality. Simply use a template that will produce the desired formatting that Movable Type understands for importing new entries. Templates for exporting data from Blogger, Greymatter, and Newspro are provided below.

In addition to exporting your data from another weblog CMS, you can export your entries from Movable Type itself. This allows you to keep local backups of your weblog content for safekeeping, as well as to transfer data between blogs, by combining the export and import mechanisms. To export the entries from one of your blogs, login to Movable Type, then go to the Main Menu for the blog you wish to export. Then click Import & Export Entries, and follow the instructions under Export Entries.

NOTE: be careful when exporting data from Internet Explorer; all versions of Internet Explorer have a bug where data marked as plain text can be intrepreted as HTML. The symptom of this bug is that all of your exported data will run together onto one line. If this is the case, use Netscape when exporting data.

After your content has been exported from the other system, you must move your data files over to the system where Movable Type runs, so that Movable Type can find them. Then you can use the import mechanism to import those entries into Movable Type.

Exporting Blogger Entries

  1. Log into your Blogger account, then switch into template-editing mode.

  2. Make a copy of your current template; you will be replacing your Blogger template with the conversion template in Step 3, but you probably don't want to lose your original template.

  3. Replace your Blogger template with the following (note: you must remove the indentation from the following lines when pasting into your Blogger template):
        <Blogger>
        AUTHOR: <$BlogItemAuthor$>
        DATE: <$BlogItemDateTime$>
        -----
        BODY:
        <$BlogItemBody$>
        --------
        </Blogger>

  4. Enter the Settings area for this blog.

  5. Change your Blog Filename to a different filename; this will prevent you from overwriting your main index file.

  6. In Formatting, set your blog to display all of your posts on the main index page. There is no explicit setting for this; instead, you should change the number of days displayed on your front page (Show N days' posts on main page) higher than the number of days that you have been blogging.

  7. Set Date/Time Format to the format MM/DD/YYYY HH:MM:SS AM|PM. (Note: the format will not look like this in the menu; instead it will be the current time, formatted.)

  8. Set Convert Line Breaks to No.

  9. Set Archive Frequency to No Archive. This will prevent your archives from being overwritten with the new template.

  10. Switch back to the Posts screen, and Publish your blog. You will end up with a single file with all of your posts, formatted using the above template, at the location specified in your Settings. Download this file to your local hard drive.

    Now skip down to Importing Entries, below.

Exporting Greymatter Entries

These instructions describe the process of exporting all entries and comments from Greymatter into a format suitable for import into Movable Type.

NOTE: if you have already imported your Greymatter entries into Movable Type, and now wish to import only your comments, use the Exporting Greymatter Comments Only instructions, below.

  1. Log into your Greymatter account, then click Edit Templates; then click Edit Main Index-Related Templates.

  2. Make a copy of all current templates on this page; you will be replacing them with the conversion templates in Steps 3-6, but you probably don't want to lose your original templates.

  3. Replace your Main Index Template with the following:

    {{logbody}}

  4. Replace your Index Entry Template: Standard Entries template with the following (note: you must remove the indentation from the following lines when pasting into your Greymatter template):
        TITLE: {{entrysubject}}
        DATE: {{monthmonth}}/{{dayday}}/{{yearyear}} {{hour}}:{{minuteminute}}:00 {{ampm}}
        AUTHOR: {{author}}
        -----
        BODY:
        {{entrymainbody}}
        -----
        {{entrycomments}}
        --------

  5. Replace your Index Entry Template: Extended Entries template with the following (note: you must remove the indentation from the following lines when pasting into your Greymatter template):
        TITLE: {{entrysubject}}
        DATE: {{monthmonth}}/{{dayday}}/{{yearyear}} {{hour}}:{{minuteminute}}:00 {{ampm}}
        AUTHOR: {{author}}
        -----
        BODY:
        {{entrymainbody}}
        -----
        EXTENDED BODY:
        {{entrymorebody}}
        -----
        {{entrycomments}}
        --------

  6. Remove all text/HTML from your Date Grouping Template, Entry Separator Template, and Stay At Top Index Entry Template.

  7. Save (do NOT rebuild at this time).

    Return to the main templates menu, then click Karma & Comments-Related Templates.

  8. Copy your current Comment Appearance Template, as in Step 2.

  9. Change your Comment Appearance Template to the following (note: you must remove the indentation from the following lines when pasting into your Greymatter template):
        COMMENT:
        AUTHOR: {{commentauthor}}
        EMAIL: {{commentauthoremailabsolute}}
        URL: {{commentauthorhomepageabsolute}}
        DATE: {{monthmonth}}/{{dayday}}/{{yearyear}} {{hour}}:{{minuteminute}}:00 {{ampm}}
        {{commentbody}}
        -----

  10. Save (do NOT rebuild at this time).

    Return to the main templates menu, then click Miscellaneous Templates.

  11. Copy your current Paragraph Separator and Line Separator templates, as in Step 2.

  12. Change your Paragraph Separator template to two carriage returns, and do the same for your Line Separator template.

  13. Save (do NOT rebuild at this time).

    Return to the main menu, then click Configuration.

  14. Change Index filename, so as not to overwrite your existing blog.

  15. Change Days to keep on main index so that it is higher than the number of days that you have been blogging. This will have the effect of placing all of your entries on your main index.

  16. Save the configuration.

    Return to the main menu, then click Rebuild Files.

  17. In the Rebuild Files menu, you only want to rebuild your main index page, so click the Rebuild Main Index File button.

    After this is done, you will end up with a single file with all of your posts, formatted using the above templates, at the location specified in your configuration. Download this file to your local hard drive.

    Now skip down to Importing Entries, below.

Exporting Greymatter Comments Only

If you have already imported your Greymatter entries into Movable Type, and now wish to import just the comments from those entries, you can do this using the following steps. Note that these instructions will only work if:

  1. You have already imported all of your Greymatter entries into Movable Type.

  2. You have not changed the timestamps (Authored on dates) on those entries after importing them; Movable Type will use the entry timestamps to determine which comments match up with which entries. Thus, if you have changed the timestamp on an entry, Movable Type will not be able to match up any comments on that entry.

Here are the steps for exporting just your Greymatter comments:

  1. Log into your Greymatter account, then click Edit Templates; then click Edit Main Index-Related Templates.

  2. Make a copy of all current templates on this page; you will be replacing them with the conversion templates in Steps 3-6, but you probably don't want to lose your original templates.

  3. Replace your Main Index Template with the following:

    {{logbody}}

  4. Replace your Index Entry Template: Standard Entries template with the following (note: you must remove the indentation from the following lines when pasting into your Greymatter template):
        DATE: {{monthmonth}}/{{dayday}}/{{yearyear}} {{hour}}:{{minuteminute}}:00 {{ampm}}
        NO ENTRY: 1
        -----
        {{entrycomments}}
        --------

  5. Replace your Index Entry Template: Extended Entries template with the following (note: you must remove the indentation from the following lines when pasting into your Greymatter template):
        DATE: {{monthmonth}}/{{dayday}}/{{yearyear}} {{hour}}:{{minuteminute}}:00 {{ampm}}
        NO ENTRY: 1
        -----
        {{entrycomments}}
        --------

  6. Remove all text/HTML from your Date Grouping Template, Entry Separator Template, and Stay At Top Index Entry Template.

  7. Save (do NOT rebuild at this time).

    Return to the main templates menu, then click Karma & Comments-Related Templates.

  8. Copy your current Comment Appearance Template, as in Step 2.

  9. Change your Comment Appearance Template to the following (note: you must remove the indentation from the following lines when pasting into your Greymatter template):
        COMMENT:
        AUTHOR: {{commentauthor}}
        EMAIL: {{commentauthoremailabsolute}}
        URL: {{commentauthorhomepageabsolute}}
        DATE: {{monthmonth}}/{{dayday}}/{{yearyear}} {{hour}}:{{minuteminute}}:00 {{ampm}}
        {{commentbody}}
        -----

  10. Save (do NOT rebuild at this time).

    Return to the main templates menu, then click Miscellaneous Templates.

  11. Copy your current Paragraph Separator and Line Separator templates, as in Step 2.

  12. Change your Paragraph Separator template to two carriage returns, and do the same for your Line Separator template.

  13. Save (do NOT rebuild at this time).

    Return to the main menu, then click Configuration.

  14. Change Index filename, so as not to overwrite your existing blog.

  15. Change Days to keep on main index so that it is higher than the number of days that you have been blogging. This will have the effect of placing all of your entries on your main index.

  16. Save the configuration.

    Return to the main menu, then click Rebuild Files.

  17. In the Rebuild Files menu, you only want to rebuild your main index page, so click the Rebuild Main Index File button.

    After this is done, you will end up with a single file with all of your posts, formatted using the above templates, at the location specified in your configuration. Download this file to your local hard drive.

    Now skip down to Importing Entries, below.

Exporting NewsPro Entries

  1. Enter the NewsPro admin interface, and click on Change Settings.

  2. Change the News Files Path to point to a different directory, so as not to overwrite your public files; you may need to create a new directory for this.

  3. Change your Archive Files Path to point to the same directory as used in Step 2.

  4. Change your Archive/Hide News setting to Archive.

  5. Change the News Age to a number greater than the number of days you've been blogging with NewsPro.

  6. Change Archive Type to One Archive.

  7. Change the Monthly Archive Links Page to point to a new, unique file, so as not to overwrite your public links page.

  8. Change the 12/24 Hour Clock to the 12 hour system.

  9. Change the Date Format to the following:
        <Field: Month_Number>/<Field: Day>/<Field: Year> <Field: Hour>:<Field:Minute>:00 <Field:AMPM>

  10. Change the News Display to the following (note: you must remove the indentation from the following lines when pasting into your NewsPro template):
        TITLE: <InsertSubject>
        DATE: <InsertDate>
        AUTHOR: <InsertName>
        -----
        BODY:
        <InsertNews>
        --------

  11. Save your settings with the Submit Settings button. Do not rebuild yet.

  12. Click on the Advanced Settings link.

  13. Under Advanced Settings scroll down to about the middle of the page and find the NumberLimit setting; make sure that it is set to zero (0).

  14. Find the CreateAnchors setting (around the middle of the page), and set it to No (Off).

  15. Save settings.

  16. Rebuild your files. Your exported entries will be compiled into a new file which you can then download. Verify your exported data. There will probably be a single line at the top of the file with a NewsPro tag or marker--remove this line. Ensure that the date format is MM/DD/YYYY (2-digit month/2-digit day/4-digit year).

    Now skip down to Importing Entries, below.

Importing Entries

Now that you have exported all of your entries from your other content management system, you are ready to import the entries into Movable Type.

  1. Connect to your FTP server; then open the directory where you installed Movable Type.

  2. Create a new directory called import, then open that directory.

  3. Upload the file containing all of your entries into the import directory.

  4. Log into Movable Type, then select the blog into which you wish to import the entries from the Your existing blogs list.

  5. Click Import Entries.

  6. You have the option of either importing the entries as yourself--the author that you are currently logged in as--or creating new authors for each author name found in the original set of entries. For example, if your blog is/was a team blog, you would probably want to recreate the original set of authors, rather than import all of the entries as yourself. Otherwise you probably wish to simply import the entries as yourself.

    If importing the entries as you, check the Import as me box.

    If creating new authors, you will need to set a password which will be used when creating each of the new authors in the system. You should also leave the Import as me box unchecked.

    NOTE: if the name of an author listed for one of the entries you are importing is already being used by an author in the Movable Type system, the entry will be assigned to the existing author, and a new author will not be created.

  7. If you would like to choose a default category for all of the entries that you import, you can do so here. This might be useful if you already have a batch of entries in your Movable Type blog, for example, and you wish to mark the newly-imported entries as uncategorized.

    If you do not choose a default category, the entries will not be assigned to a particular category (unless the entries you are importing use the CATEGORY key to specify their category).

    If you choose a default category, and one or more entries use the CATEGORY key in the list of exported entries, the CATEGORY key will override the default category, for those entries using the CATEGORY key; all other entries will be assigned to the default category.

  8. The Title Start HTML and Title End HTML values are used to identify a post title within the body of an entry. This is useful when importing entries from Blogger, for example, because Blogger posts do not have the concept of a separate title field. If you have named your posts consistently through the use of HTML tags, however, Movable Type can parse your blog entries to find those titles. For example, if all of your entry titles look like this:
        <font class="title">I am a title</font>

    Then you could use a value for Title Start HTML of

        <font class="title">

    and a value for Title End HTML of

        </font>

    to automatically set the titles of your entries when importing. If found, the title, along with the surrounding HTML, will be removed from the body of your entry.

    If you do not fill in these values, or if the relevant HTML cannot be found for a particular entry, the first five (5) words of the entry are used as the title, instead.

  9. After filling in the necessary values in the form, press IMPORT to import your entries.

  10. That's it!

    NOTE: You should now remove all of the files that you imported from the import directory, so that if or when you run the import process again at some later date, the entries you just imported will not be re-imported.

    You will need to rebuild all of your files in order to generate your archives for the new imported entries.


PROGRAMMATIC INTERFACES

XML-RPC API

Movable Type features a full implementation of the Blogger XML-RPC API (where applicable). The only two methods that are not supported by Movable Type are getTemplate and setTemplate, due to the differences between Blogger's template system and Movable Type's template system. Usage of the XML-RPC API requires that your webserver have both LWP::UserAgent and SOAP::Lite installed; if yours does not, the Installation Instructions can tell you how to install them.

Following are the XML-RPC methods supported by Movable Type:

NOTE: the value of appkey is ignored by Movable Type in all XML-RPC methods.

You can use Movable Type's XML-RPC implementation with existing tools like BlogBuddy and Jericho (it has been tested with these two tools; it will most likely work with other tools, as well). For example, to set up BlogBuddy to post to your Movable Type blog, follow these instructions:

  1. Download BlogBuddy from http://blogbuddy.sourceforge.net/. Unpack the archive, and install the application.

  2. Open the BlogBuddy application.

  3. Select General Settings from the Settings menu. On the General tab, enter your Movable Type username in UserName, and your password in Password.

  4. In the Remote Host tab, enter the name of the host where your version of Movable Type is installed into Host name, and the path to mt-xmlrpc.cgi into Endpoint. For example, if mt-xmlrpc.cgi is located at http://www.foo.com/bar/mt-xmlrpc.cgi, you should enter www.foo.com into Host name, and /bar/mt-xmlrpc.cgi into Endpoint. If your webserver runs on a port other than 80, you should also change the port setting.

  5. In the Blogs tab, click the Update blogs button; BlogBuddy will contact Movable Type on your webserver, and ask it for a list of blogs which you have access to (using getUsersBlogs, above).

  6. You can now post to your Movable Type blog(s) using BlogBuddy's posting interface.


TROUBLESHOOTING

I see the source of the CGI script when I run Movable Type

If, when you try to load mt.cgi into your browser--or mt-load.cgi or mt-check.cgi during the installation process--then the problem is that your webserver does not have CGI scripting enabled in its configuration.

If you run your web site on a hosted provider, you will need to email the support for this provider and ask them to turn on CGI scripting for your account (or for the webserver on a whole); this is not something that you can configure yourself.

If you run your own webserver, or if you have access to the webserver configuration files--and the privileges to restart the webserver, after modifying the configuration--you can use these steps to enable CGI scripts on your webserver. The following instructions assume that you are running Apache.

  1. Find the configuration file httpd.conf, and open it up in an editor.

  2. Find the Directory or Location block that configures the webroot for the server.

    Inside of that block, add this line:

        Options +ExecCGI

  3. Outside of the Directory or Location block, add the line
        AddHandler cgi-script .cgi

  4. Restart the webserver.

CGI scripts should now execute, instead of merely displaying their source.

I get a 500 Internal Server Error

500 Internal Server Error is the general webserver error that occurs when something goes wrong--in particular, when something goes wrong when trying to execute a CGI script.

Here is a list of diagnostics for trying to fix this error:

Images, styles, and documentation do not show up

If, when you first view Movable Type, the images and styles do not show up properly in your browser, you will need to move the images, documentation, and stylesheet to a different location. The reason for this is that you installed Movable Type into your cgi-bin directory, because--presumably--it was necessary to do so on your server. But hosting non-CGI files out of the cgi-bin directory causes problems, because the webserver sometimes tries to execute the images, as if they were programs.

To fix this, you will need to re-upload the images directory (images), the documentation directory (docs), and the stylesheet (styles.css) to a different directory, outside of your cgi-bin directory. Then, edit the mt.cfg file, and add this line:

    StaticWebPath /path/to/dir/

where /path/to/dir/ is the URL to the directory containing images and styles.css. For example, if images is located at /movable-static/images/, you would use

    StaticWebPath /movable-static/

This should fix the problem.

I keep getting the Movable Type login screen

The problem: you log in to the system and get the Main Menu; but every link you click on that screen brings you back to the login screen.

The reason for this is likely that you have cookies disabled in your browser. Movable Type uses a cookie to store your authentication credentials; in this cookie, your password is one-way encrypted, so this is not a security risk. If you do not allow this cookie, however, Movable Type has no way of knowing that you have already successfully logged in, so it will present you with a login prompt when you try to do anything.

To fix this problem, you will need to enable cookies in your browser.

I can't logout!

The problem: you are logged in to Movable Type; then you logout, and try to login as another user (for example). But you are still logged in as yourself.

This is probably due to your browser having several versions of the Movable Type login cookie. The reason this might happen is that the cookie is dependent on the domain name; so if you have two different domain names that access the same Movable Type installation, and you use both to get there, you will get two versions of the Movable Type cookie. If one domain name is a substring of the other domain name--for example, if one domain is www.foo.com, and the other is foo.com--then you will need to log out of both sessions in order to truly logout. To do this, load Movable Type on both domains, and log out of both sessions.

Because of this, if possible it makes sense to always access Movable Type through one single domain name.

I never receive email notifications for comments

NOTE: another symptom of this problem is that notification messages sent through the Edit an entry screen never reach the members of your notification list.

If you know that users are posting comments on your site, and you are not receiving them, you should first check your blog configuration to ensure that Email new comments? is checked.

If it is, then this is most likely a problem with the path to the sendmail program on your webserver; this is the program used to send email. Movable Type looks in three locations for sendmail: /usr/lib/sendmail, /usr/sbin/sendmail, and /usr/ucblib/sendmail. These are the three most common locations for sendmail on Unix machines. If your version of sendmail is at a different location, here are instructions for telling Movable Type what that location is:

  1. Determine the location of sendmail on your webserver. You may need to ask your hosting provider or system administrator for this information.

  2. In the directory where you installed Movable Type, there is a file called mt.cfg; download that file, and open it in an editor. (If you are comfortable with the shell, you do not need to download the file, but can instead edit it in vi or another editor of your choosing.)

  3. Add this line to the file:
        SendMailPath /path/to/sendmail

    where /path/to/sendmail is the path to sendmail that you determined in Step 1.

  4. Save mt.cfg, and re-upload it to your server. Ensure that you upload the file in ASCII (text) format. (If you used the shell to edit the file, you can skip this step.)

That's it; if the location to sendmail is correct, you should now be able to receive email notifications of new comments.

My webserver doesn't have sendmail

If you have tried the above steps to get sendmail working, or if you know that your webserver doesn't have sendmail--for example, Win32 machines do not have sendmail--Movable Type allows you to send email messages through SMTP. To do this, you will need to install the Mail::Sendmail Perl module; if you are on Win32 machines, you can do this using Activestate's ppm tool. Launch ppm, then at the prompt, type

    install Mail::Sendmail

and ppm will do all of the work to install the module. If you are on a non-Win32 machine, and you need (or prefer) to use SMTP, you can download the distribution from here:

    http://www.cpan.org/modules/by-modules/Mail/Mail-Sendmail-0.78.tar.gz

Unpack the archive using an extraction program, then connect via FTP to your webserver. Open the directory where you installed Movable Type, then open the extlib directory; then create a new directory called Mail. Then open the Mail directory, and upload the file Sendmail.pm from the archive into the Mail directory.

After you have installed Mail::Sendmail, you will need to configure Movable Type to send mail using SMTP. To do so, edit your mt.cfg file, and add the line

    MailTransfer smtp

By default, Movable Type will try to use the SMTP server on the webserver (on localhost); if you need to change this, add another line

    SMTPServer address.of.smtp.server

Save (and re-upload, if necessary) your mt.cfg file, and you're done. Movable Type should now send email through the SMTP server.

I get an error about .new files when rebuilding

When rebuilding a page, Movable Type first writes the page data to a temp file, then renames the temp file to the actual file name. The temp file is named with an extension of .new; for example, if the file index.html is being rebuilt, the temp file would be named index.html.new. Movable Type does this to prevent corruption of your public files; if, for some reason, the rebuild process is killed in the middle of writing data to a file, that file will not be complete, and will appear corrupted to a web browser.

The process of writing to temp files requires that permissions on the Local Site Path directory be set to 777; some users can not--or would rather not--set the permissions this liberally, and will then receive errors when Movable Type is unable to write to the .new temp files. If this is the case for you, you can turn off the use of temp files. To do so, edit your mt.cfg file, and add the line

    NoTempFiles 1

This will tell Movable Type not to write data to temp files, and you should no longer receive errors when rebuilding.

I don't like the 404 error page that comes with MT

The Movable Type distribution includes a file index.html in the main Movable Type directory; when you upload this file to your webserver, it prevents users from viewing the contents of the directory listing. This is not meant to provide bulletproof security, but it keeps away curious viewers.

The version that ships with Movable Type is rather plain, so if you'd like to improve it on your server, just edit the file index.html; it's just a standard HTML file.

If you are using Apache as your webserver, you can use a different technique to prevent users from viewing your directory listings:

  1. Create a file .htaccess in the directory where you installed Movable Type.

  2. Open that file in an editor.

  3. Add the line Options -Indexes to that file.

  4. Save the file, then exit the editor.

If you use this technique, you can remove the index.html file from the directory; the webserver will then prevent viewers from listing the contents of the directory.

I changed hosts, and now I can't log in to Movable Type.

When you change hosting providers (or just move to a different server at the same provider), it is possible that the two servers have different versions of the Berkeley DB library; this is the library that Movable Type uses to store your data. When you copy the DB files from one host to another, if the two hosts have different versions of Berkeley DB, the new host will not be able to read the files from the old host.

This can be fixed by converting the DB files over to the format used by the new library version; this is accomplished in several different ways, depending on the Berkeley DB versions involved. The files that need to be converted are all of the files in your db directory whose filenames end in either .db or .idx (the .lock files do not need to be converted).

The following steps require that you have shell access to your server, and imply that you are somewhat familiar with running Unix commands; if this is not the case, you should ask your hosting provider to help you.

  1. First, and most important, back up your DB files; you need to create backup copies of all of the files in your db directory. (If you do this by downloading the directory, make sure to transfer it in binary mode.)

  2. The easiest way to convert the DB files is to use the db_upgrade program; unfortunately this is not available on every server, but it may be available on yours. To find out, log into your shell account, and type the following at your shell prompt (<db_dir> is the path to your db directory):
        $ cd <db_dir>
        $ db_upgrade *.db *.idx

    If your server has db_upgrade, this will convert all of your DB files over to the new format. If this works, you're done, and you can skip the following steps; Movable Type should now work.

  3. If the above db_upgrade command does not work--for example, if you get an error saying that command not found--then you will need to use the following method to convert your data. This method dumps out all of the data from your DB files, then loads it into new versions of those DB files.

    The program used to dump the contents of your DB files is called either one of two things: db_dump, or db_dump185. To determine which program you need to use, first try running the following command in your shell account:

        $ cd <db_dir>
        $ db_dump author.db

    If this command is successful, you will see a screenful of data dumped out. If it is unsuccessful, you will get an error message; in this case, try using the following command:

        $ db_dump185 author.db

    Again, if the command is successful, you will see a screenful of data. If this also fails, then you will need to contact your hosting provider.

  4. Now that you have determined which db_dump program to use (either db_dump or db_dump185), you can dump all of the data from your old DBM files and load it into new versions of those files. To do that, try the following (substitute db_dump185 instead of db_dump, if necessary):
        $ db_dump -f author.db.data author.db
        $ mv author.db.old
        $ db_load -f author.db.data author.db
        $ chmod 666 author.db

    You will need to run these four commands for each file in your db directory whose name ends in .db or .idx. After you have done so, you're done, and Movable Type should now work.


Copyright © 2001, 2002 Ben Trott and Mena Trott. All Rights Reserved.