Template for MT entry and comment export and Drupal import

To do:

  • Automatically create accounts
  • Export MT categories and import to Drupal taxonomy

Limitations:

  • All comments are from the Anonymous user
  • All comments are unthreaded
  • The comment subject is made from the first five words of the comment
  • The import defaults to using uid 1, i.e. the site admin (change the $uid variable to import to another user)
  • All posts are promoted to the front page
  • All comments have a published status
  • MT categories (Drupal taxonomy terms) are not exported

Instructions:

  1. Create a new Movable Type Index template called Drupal Import with import.php specified as the Output File
  2. Cut and paste the following into the Template body textarea
  3. Set the variables below the //set variable defaults comment to the correct values
  4. Save and rebuild the template
  5. Load import.php in your web browser

If the import is successful, the output will be a single sentence listing the number of entries and comments imported.

<html>
<head>
<title>Export</title>
</head>
<body>

<?php
//set variable defaults
$hostname = "";
$username = "";
$password = "";
$db = "";

Disabling clean URLs

It's possible that a Drupal site that was once configured to run with clean URLs later on stops doing so. After that, almost all content is inaccessible, because the paths being generated are not supported by the hosting platform.

This occasionally happens

Pages

Subscribe with RSS Subscribe to RSS - Drupal 4.5.x or older