Textpattern logo

Help?

Import

From Textbook

Figure 1: The Import tab.
Figure 1: The Import tab.

Textpattern's import features allow you to import Weblog articles from another Weblog system.

Note: Few Weblog systems are supported at this time, but more will be added as time goes by. You can help Textpattern Developers increase the system options by writing your own script for a missing system, which can be refined and added to the Textpattern core.

Contents

Panel Controls

The import panel is pretty simple, consisting of just four controls (Figure 2), which are described in the following sections.

Figure 2: Import panel controls.
Figure 2: Import panel controls.

Import from (1)

The first control is a dropdown box that lists the various systems Textpattern supports at any given time (Figure 3).

Figure 3: Publishing system options currently supported for importing.
Figure 3: Publishing system options currently supported for importing.

For each system supported, there is generally one of two ways the publishing system data is imported, either via a text file or via a MySQL database, and sometimes, as in the case of Movable Type, both methods are supported as indicated in Figure 3. If a system does not indicate which mode is supported in the dropdown options, it could be one or the other, but not both.

For clarity, the supported modes for the existing system options are as follows:

  • Movable Type (file or database)
  • Blogger (file or database)
  • b2 (database)
  • Wordpress (database)

Section to import into (2)

The second control is a dropdown box that simply lists all the Sections that you currently have created in Textpattern (Figure 4).

Figure 4: Section options; reflective of those you have already created.
Figure 4: Section options; reflective of those you have already created.
Note: Sections are what you create in the Sections tab.

Default article status (3)

The Default article status control is a dropdown box that lists Textpattern's article status options (Figure 5). These are the same options you choose from when first drafting an article in the Write tab.

Figure 5: Textpattern's article status options.
Figure 5: Textpattern's article status options.

Default comments invite (4)

The Default comments invite control is a text box that allows you to create a custom label for the comments invite link that will appear for your respective articles (Figure 6).

Figure 6: Comments invite field for custom invite link label.
Figure 6: Comments invite field for custom invite link label.
Note: The comments invite can be controlled in two other locations in Textpattern. The first is in the Comments section of the Basic Preferences, which controls the invite label and other comment settings for the entire site by default. The second is in the Write tab, where you can set the invite label for each new article you write.

The Process

Importing from a Text File

Importing systems via a text file (such as for Movable Type and Blogger) can be done by first exporting data into a text file, which in turn can be imported into Textpattern. Do this as follows:

  1. Name the textfile import.txt and place the file in the directory located at /textpattern/include/import/.
  2. Go to the Import subtab (the panel you are reading about now), and make the appropriate selections as described under the Controls section above (Figures 3 through 6).
  3. Click the Continue button. Textpattern will use your text file import.txt and import it's contents into the Textpattern database structure. You get a list of imported articles with a message at the end about the status of the action.

When it's done, you can go the the Articles tab and see all your articles are now listed, which should be the case if all went reasonably well.

See also the articles:

Importing from a MySQL database

When you select a system from the dropdown Import from options (Figure 3) that is a database option, a new set of controls will appear under the regular tab controls. The controls will consist of a common set of configuration fields for all imported systems (Figure 7).

Figure 7: Additional Database Data controls.
Figure 7: Additional Database Data controls.

However, depending on which system you are importing, there may be an additional field specific to that system, which is talked about shortly in the following sections.

In any case, you begin for all systems by filling in the common database information indicated in Figure 7. Movable Type and WordPress each has an additional, unique field to address in the Database Data controls.

For Movable Type it will be a control called Weblog ID (Figure 8).

Figure 8: Movable Type database option.
Figure 8: Movable Type database option.

For Wordpress it will be a control for table prefix (Figure 9). Most likely you can leave the default wp_ if you haven't changed that when you installed WordPress (you might have changed it if your WordPress site shared the database with another application).

Figure 9: Wordpress option.
Figure 9: Wordpress option.

Fill in the information accordingly and press the Continue button.

Textpattern will connect to your old database and import the external system's contents into the Textpattern database structure. You get a list of imported articles with a message at the end about the status of the action.

When it's done, you can go the the articles tab and see if all went well. If so, congratualations and welcome to Textpattern.

Translations [?]...

About Textbook