MT Daily Builds Guide

From MovableType

Contents

Explorer Guide to Movable Type Daily Builds

Movable Type daily builds show off the the latest experimental development efforts of the Movable Type team of Six Apart. These builds show off some great new features built on top of Movable Type 3.3 to make it an even better publishing platform for professional bloggers and publishers. We were gonna release these as MT 3.5, but we're focusing on the next major release of Movable Type, codenamed "Athena" instead.

Download the Movable Type daily build from the Movable Type Beta Blog.

New and improved features of Movable Type daily builds

This Movable Type experimental releases includes the following new major features, in addition to many other small enhancements and bugfixes.

Asset management

You can now manage files you uploaded as assets within Movable Type. You can upload and remove assets, tag those assets just like you can tag entries, and insert your assets to new entry to make you blog post look better. You can also create your own photo gallery pages with the new template tags.

Backup and Restore

Movable Type system administrator can now backup the whole system and restore to other systems, all from within Movable Type. Backup data is stored in XML format, optionally compressed in tar or zip format. Assets can also be backed up and archived together, so they can be restored as an atomic unit.

Clone weblogs

You can now clone a weblog to create another weblog. You can also create a "template" weblog, and each time a new weblog is needed, you can clone the template to create the new one, so it has all required settings by default.

Privileges & Roles

Movable Type is known as one of the most flexible platforms when it comes to managing weblog authors' permissions. Movable Type daily builds take it even farther by introducing roles and associations. Movable Type system administrators can now create roles which are combination of granular permissions, and associate roles to users, so users are allowed to do only the things in the system that they need to, and no more. Weblog administrators can also add users to their weblogs as authors, editors, or designers.

User Status

In previous versions of Movable Type, you couldn't remove authors even if they were not users of the system any longer, because removing authors would make entries authored by them orphans. You must instead remove all permissions from authors. In Movable Type daily builds, you can disable users so users can not login before system administrator re-enable their status back. Disabled users still reside in the system so the entries authored by them are all correctly states who wrote that in the first place.

Asset Management

What is an asset?

An asset is a file uploaded to Movable Type through the asset management interface. An asset can then be used as an embedded image or a linked resource for an entry.

How do you upload an asset?

There are two ways to upload a file as an asset.

Upload a new asset from Edit Entry screen

Two textareas on the Edit Entry screen have Insert Image and Insert File button on each toolbar. Clicking one of them pops up a dialog which navigates you through the process of uploading a file and setting up some attributes for the uploaded file, as described below.

Insert Image
Click the Insert Image button and the dialog pops up. You can choose assets already uploaded to be embedded in the entry, or you can click Upload New Image link to start the process of uploading.
Upload New File
Choose a file to upload, and optionally select where to upload the file. Click Upload and uploading starts.
Insert Image
Once uploading is done, you can choose how to embed the image in the entry. You can choose alignment, whether or not you link will pop up a new window for full sized image. You can save the settings as default values for other users who will post to the same blog. Click Finish and the necessary HTML will be generated and pasted into the textarea.

Upload a new asset from Assets listing screen

Movable Type now has Assets menu item on the left navigation bar, which navigates to Assets listing screen.

  • Click Upload New File and the Insert Image dialog pops up.
  • Choose a file to upload, and optionally select where to upload the file. Click Upload and uploading starts.
  • Upload Image
  • Once uploading is done, you can choose whether or not to create a new entry with the uploaded image. You can choose alignment, whether or not you link will pop up a new window for full sized image. You can save the settings as default values for other users who will post to the same blog. Click Finish and the necessary HTML will be generated and the screen will navigate to New Entry screen, and the HTML will be pasted into the textarea. If you choose not to create a new entry, you will be navigated back to the Assets listing screen.

How do you add tags to assets?

You can add tags to assets just like you can add tags to entries.

  • Navigate to Assets listing screen, and choose assets by checking the checkboxes to which you will add tags.
  • Select Add Tags... from the dropdown list on the right shoulder of the list, and click Go.
  • Input box pops up. You can add number of tags separated by your own separator (space or comma). Click OK and tags will be added to assets.

Note: Asset tags are not listed in Tags listing screen (under both System Overview and a weblog). This is currently by design. Asset's tags can be checked if you see the asset details in the popup window (described below).

How do you remove assets?

Removing assets are as easy as removing other objects in Movable Type.

  • Navigate to Assets listing screen, and choose assets by checking the checkboxes to which you will add tags.
  • Click Remove button. Warning message pops up and clicking OK will remove assets from both Movable Type system and remove actual files in the file system.

How do you see the detail of each asset?

You can see the detailed information of each asset.

  • Navigate to Assets listing screen, and click the name of an asset. A small screen pops up which includes information of assets such as dimension, associated tags, and file path.

Backup and Restore

In the previous versions of Movable Type, you can partially back up weblogs by exporting it. You can always backup database tables themselves by accessing to the database management tool, but not everyone has access to the command. Movable Type's new experimental daily builds introduce a full fidelity backup and restore feature within the system itself.

What will be backed up?

Movable Type's backup feature currently backs up the following objects:

  • Tags, Users, Weblogs, Notifications, Templates, Roles, Associations, Permissions, Categories, Assets[1], Entries, FileInfos, Trackbacks, Comments and PluginData

[1]: Not only assets data, but also actual files related to assets are also backed up.

In addition to these objects, Movable Type now also offers a callback for plugins to join in the back up session and serialize plugins' own data into the backup data.

How do you backup all the data in Movable Type?

You can start backing up the system by merely clicking a button. In addition to allowing "backup everything", Movable Type also allows only a weblog or selected weblogs and related objects to be backed up. You can choose a weblog or a few and backup them. Related objects such as users who has associated to the selected weblog, and entries, comments and trackbacks of selected weblogs are also backed up.

  • Click Backup menu item on the left navigation bar. It will navigate to the backup screen.
  • You can choose What to backup, either Everything (every objects in every weblog), or specific weblogs and related objects only.
    • When you choose Choose Weblogs to Backup from the dropdown, the dialog appears in which you can choose weblogs.
  • You can choose Type of archive format, by which Movable Type will decide how to generate the result file(s).
    • The options are ZIP, TAR, and Don't compress. The options appear based on the availability of Perl modules installed.
  • You can also choose the Number of megabytes per file, by which you specify approximately how many kilobytes each backup file will be.
    • Note the actual size of each file generated will exceed the number specified here. This is by design, so you must choose smaller number if you are not sure.
    • The options are 300KB, 500KB, 1MB and 2MB. The options appear depending on how many bytes are allowed to be uploaded in the configuration setting (CGIMaxUpload).
  • Clicking Backup button starts backup of the system. This may take long time depending on how large the system is.
  • When the backup finishes, Movable Type will push the result file to be downloaded if the result is just one file, or show the list of files in the result screen so you can download files one by one.
    • Note you can't download the backup file twice due to security reasons. You must also make sure backup files will be stored securely, because they contain very sensitive information.

How do you restore?

Movable Type now offers several ways to place backup files to be restored. Either way, the restore operation will restore objects from XML representation of them, and restore the relationships between objects (for example, the relationship between a weblog and an entry).

  • Click Backup menu item on the left navigation bar. It will navigate to the backup screen.
  • Click Restore tab to show the restore screen.
  • If you have a fairly small backup file (small enough to be uploaded in the web browser) in the format of either XML, ZIP or TAR.GZ, you can upload the file by specifying the file to Upload Single File section and click Restore button.
    • Movable Type receives the backup file and expands it if necessary, and start the restore operation.
  • If you have large files from a single backup session, you can upload the file via FTP or other protocol to Movable Type's import folder.
    • You then click the Restore button in the Single Flie Restore secion by not specifying any file in the file text box. Movable Type Wheeljack will search for a file whose extension is .manifest and start the restore operation using the file.
  • If you have multiple files from a single backup session, you can upload the MANIFEST file to Multiple Files Restore section and click Upload Multiple Files.
    • Movable Type pops up a dialog which navigates through the restore process. You will upload the files in the set one by one. What to be uploaded next will be designated in the dialog.

Clone Weblogs

In Movable Type, an user who has permissions can create as many weblogs as he/she wants just by clicking a link. Movable Type is also one of the most flexible publishing platform in the industry, allowing web designers customize templates as colorful and useful as it should be. However, in order to apply the creativity to a newly created weblog has not been that easy because creating a new weblog and applying templates are two different tasks to do.

Movable Type Wheeljack now includes Weblog Cloner plugin which allow a system administrator to clone a weblog to create another weblog in just a click of a button. You can create a template weblog which consists of required templates and intruductory entries first, and every time a new weblog is in need, you can clong the template weblog to create a new one, inheriting all the required objects in it by default.

How do you clone a weblog?

You can clone a weblog from Weblogs listing screen.

  1. Select a weblog by checking the checkbox in the list. Note you can't choose more than a weblog to clone.
  2. Choose Clone Weblogs from the dropdown on the right shoulder of the list of weblogs.
  3. Click Go button. Dialog pops up to indicate the progress of cloning.
  4. When it finishes, the link appears to close dialog and go back to the main screen.

Privileges

Because Movable Type allows administrators manage what users can do in a certain granularity, it was sometimes cumbersome for adminsitrators to grant and revoke permissions to and from users. Movable Type Wheeljack changes the way system administrator manages what the users of the system can and cannot do, by introducing roles and associations.

What are roles?

Roles are a collection of permissions that together give a user a role, to allow for different types of users within Movable Type. Permissions which can be added to a role are:

What are new permissions added in daily builds of Movable Type?

To manage certain aspects of asset management feature, Movable Type has added two new permissions.

  • Manage Assets
    • Users with this permission can edit, tag, and remove assets in a specified weblog.
  • Set Image Defaults
    • Users with this permission can save the default settings of uploading an image file.

What are the default roles automatically created when I upgrade to a daily build of Movable Type?

Movable Type creates the following default roles in the system when installing it or upgrading an existing Movable Type install.

  • Weblog Administrator
    • The role grants its users to administer a weblog.
  • Designer
    • The role grants its users to edit templates and rebuild files in a weblog.
  • Editor
    • The role grants its users to edit all entries, categories and tags, and rebuild files in a weblog.
  • Editor (can upload)
    • All the same as editor, plus the role grants users to upload files to a weblog.
  • Publisher
    • The role grants its users to edit all entries, categories and tags, and rebuild files and send notifications in a weblog.
  • Writer
    • The role grants its users to add new entry and edit their own entries.
  • Writer (can upload)
    • All the same as writer, plus the role grants users to upload files to a weblog.

What are those Custom roles created automatically?

When upgraded from the previous versions of Movable Type, Movable Type looks for the existing combination of permissions and either matches those with the default roles, or create custom roles each of which has the exact combination of permissions. You should change the name of the generated custom roles to more identifiable names.

How do you create a role?

If the default roles do not serve what you want, you can create a new role. You must be a system administrator in the Movable Type installation.

  1. Go to Privileges menu item on the left navigation bar in the System Overview page.
  2. Click Roles tab to goto Roles page.
  3. Click Create A New Role link on the right shoulder of the roles list.
  4. In the Create New Role page, enter name and description (optional), and check the roles you want to be combined into the role.
  5. Click Save Changes and new role is created.

How do you associate a role to a user

How do you associate a role to a weblog?

How do you associate a user to a weblog?

These three questions are all asking for the same thing. All roles are for a particluar weblog, so you cannot just assign a user to a role in Movable Type. You always assign a user to a role and to a weblog. So for example, if Alice has Editor access to First Weblog, it does not necessarily mean she has Editor access to other weblogs. In other words, a user cannot be universally granted any role across weblogs. It could also be possible that Bob has Writer access to First Weblog, and at the same time he also has Weblog Administrator access to Second Weblog.

OK, how?

If you are a system administrator, you can associate a user to a role to a weblog:

  1. Go to Privileges menu item on the left navigation bar in the System Overview page.
  2. In the Associations tab, click Create a User Association.
  3. A dialog pops up which has a list of users. You can search users using the box on the right shoulder. You can choose as many users as you want in the single page. Choose a user/users and click Continue.
  4. The second page has a list of roles. You can search for roles using the box on the right shoulder. You can choose as many roles as you want in the single page. Choose a role/roles and click Continue.
  5. The third and final page has a list of weblogs. You can search for weblogs using the box on the right shoulder. You can choose as many weblogs as you want in the single page. Choose a weblog/weblogs and click Confirm.

If you are a weblog administrator and want to add users to your weblog:

  1. Go to Users menu item on the left navigation bar in a weblog page.
  2. Click Add a User to this weblog.
  3. A dialog pops up which has a list of users. You can search users using the box on the right shoulder. You can choose as many users as you want in the single page. Choose a user/users and click Continue.
  4. The second and the last page has a list of roles. You can search for roles using the box on the right shoulder. You can choose as many roles as you want in the single page. Choose a role/roles and click Confirm.

How do you disassociate a user from a weblog?

How do you remove a user from a role?

How do you disassociate a role from a user?

Again, these are all asking for the same thing. You cannot just remove a user from a role. You can remove association between user and weblog and role.

If you are a system administrator, you can associate a user to a role to a weblog:

  1. Go to Privileges menu item on the left navigation bar in the System Overview page.
  2. In the Associations tab, choose association of user to role to weblog by checking checkboxes.
  3. Click remove to remove association.

Or, you can remove association from role's perspective.

  1. Go to Privileges menu item on the left navigation bar in the System Overview page.
  2. Click Roles tab to show list of roles.
  3. Click Users tab to show list of users who are associated the role to a weblog.
  4. Choose association of user to role to weblog by checking checkboxes.
  5. Click remove to remove association.

Or, you can remove association from user's perspective.

  1. Go to Users menu item on the left navigation bar in the System Overview page.
  2. Click on a name of the user to show the user's profile page.
  3. Click Associations tab to show list of roles which the users are in.
  4. Choose association of user to role to weblog by checking checkboxes.
  5. Click remove to remove association.

If you are a weblog administrator you can remove association from weblog's perspective.

  1. Go to Users menu item on the left navigation bar in a weblog page.
  2. Choose association of user to role to weblog by checking checkboxes.
  3. Click remove to remove association.

User Status

Movable Type daily builds introduce the new notion of the status of users. Users can now be either enabled (default) or disabled at system administrator's will. Enabled users are the users in the sense in previous versions of Movable Type. Disabled users are those who once were users of the Movable Type installation but are currently not, temporarily or permanently. Disabled users cannot login to the system. But they are still users in the system meaning their posts are all preserved.

What are the statuses you can assign to a user?

You can assign to a user either Enabled or Disabled status.

How do you disable user(s)?

You can disable a user, or selected users. To disable a user:

  1. Go to Users listing screen in the System Overview.
  2. Click a user's name who will be disabled. The user's profile page appears.
  3. Choose Disabled from the dropdown and click Save.

To disable selected users:

  1. Go to Users listing screen in the System Overview.
  2. Select users by checking the checkboxes in the list.
  3. Click Disable button to disable all of selected users.

You can re-enable a user or selected users by doing the same procedure, only by choosing Enabled or clicking Enable button.

For developers and designers

New Template Tags

Movable Type daily builds introduce several new template tags, mainly so template designers can leverage the new asset management feature.

Assets related template tags

New template tags related to Assets Management are all described in MT Daily Builds Template Tags

Other new template tags

  • MTTemplateCreatedOn
    • This new value tag returns the date when the template in which the tag is used was created. All attributes available to MTDate can also be used with this value tag.

New Callbacks

Movable Type's new Backup and Restore feature is built with extensibility in mind. For plugins which uses MT::Object-derived types, backup and restore operation call callbacks for plugins to inject XMLs so they are also backed up, and read XML so they are also restored.

"Backup" callback

The callback is used for MT::Object-derived types used by plugins to be backed up.

Calling convention is:

  • callback($cb, $blog_ids)
    • $blog_ids has an ARRAY reference to blog_ids which indicates what weblog a user chose to backup. It may be an empty array if a user chose Everything.

The callback must return the object's XML representation in a string, or 1 for nothing.

If a plugin has an MT::Object derived type, the plugin will register a callback to Backup callback, and Backup process will call the callbacks to give plugins a chance to add their own data to the backup file.

Callbacks for restore

The callback is used for MT::Object-derived types used by plugins to be restored.

Calling convention is:

  • callback($cb, $data, $objects, $deferred, $callback);
    • $data is a parameter which was passed to XML::SAX::Base's start_element callback method.
    • $objects is an hash reference which contains all the restored objects in the restore session. The hash keys are stored in the format MT::ObjectClassName#old_id, and hash values are object reference of the actually restored objects (with new id). Old ids are ids which are stored in the XML files, while new ids are ids which are restored.
    • $deferred is an hash reference which contains information about restore-deferred objects. Deferred objects are those objects which appeared in the XML file but could not be restored because any parent objects are missing. The hash keys are stored in the format MT::ObjectClassName#old_id and hash values are 1.
    • $callback is a code reference which will print out the passed parameter. Callback method can use this to communicate with users.

If a plugin has an MT::Object derived type, the plugin will register a callback to Restore. <element_name>:<xmlnamespace> callback, so after the restore operation will call the callback function with parameters described above. XML Namespace is required to be registered, so an XML node can be resolved into what plugins to be called back, and can be distinguished the same element name with each other.

Sample Plugin

Movable Type daily builds come with an example plugin which leverages a MT::Object-derived type, and backup, and restore callbacks. Please see extras/examples/plugins/BackupRestoreSample.