Getting started with Drupal
The Drupal CMS is one of the most popular and well-supported content management systems in the world and is constantly being improved and enhanced by its large collection of community-contributed modules. Its security and stability have been proven over years on the Internet, which makes it a strong choice for those who collect and publish archival content on the web. In this section you begin setting up the Drupal environment.
After you download the Drupal package from Drupal's site, you need to uncompress the archive and upload it to your web server. Although methods for performing this step vary, we used the free FTP client program FileZilla to FTP the Drupal files to our web host, as illustrated in Figures 1 and 2.
Figure 1. Upload Drupal to your web server
The filename of the Drupal installation usually includes the version number (for example, in this case, it's 6.19). For the purposes of this tutorial, we are going to install Drupal to the root of our website, digarch.org. For that reason, we upload only the contents of the downloaded Drupal folder to the web root directory of our website.
If you wish to install the publication site outside of your root website directory, you need to upload the entire drupal-6.19 folder to the chosen location on your site. Then, simply rename the folder containing the Drupal installation to reflect the address you want to appear on the web, changing drupal-6.19 to journal, for instance, if you want the publication to appear as yoursite.com/journal. From this point on in the tutorial, the directory that contains all the Drupal files is referred to as [DRUPAL_HOME].
Read the INSTALL.TXT file that is included in the root of the Drupal installation to ensure that you meet all the requirements for your specific web hosting environment. We briefly cover the basic installation and configuration here.
After you upload all the Drupal files to the chosen location on your website, you need to create the required settings file for your site. The easiest way to do this is to locate the default.settings.php file (which should be located in the [DRUPAL_HOME]/sites/default directory; see Figure 2) and rename it to settings.php. You also need to grant Drupal access to your database. Consult your database's documentation or your web host's instructions to complete this part, as the process varies considerably from installation to installation.
Figure 2. Rename the default.settings.php file to settings.php
With these steps complete, Drupal's online installer can make the rest easy for you; just browse to your site and follow the onscreen instructions.
If you have prior experience with Drupal, you will be happy to see that installing the modules recommended in this tutorial is achieved in the same manner as most other Drupal modules:
- Download the necessary files from the modules' project pages (see Resources).
- Content Construction Kit (CCK)
- XML Content
- Move the entire directory containing the module's files (usually the directory name is the same as the module name) to your Drupal site in the [DRUPAL_HOME]/sites/all/modules directory, creating this directory if necessary
After you upload the modules, browse to the Modules section of Drupal's administration panel (Administer > Site Building > Modules). To enable each module, checking the box next to the components for each module that you installed, as in Figure 3. (Selected modules include Content, Content Copy, Content Permissions, Fieldgroup, Node Reference, Number, Option Widgets, Text, and User Reference for the CCK and XML Content for the Content Filters.)
Figure 3. Enable Drupal modules
Don't forget to click the Save configuration button at the bottom of that page, or the modules are not enabled.
After you save your configuration changes, you receive a confirmation dialog noting that they were saved, and in this case an additional message (see Figure 4) asking you to configure some field permissions. These permissions pertain to the CCK module; it needs to know what kinds of users on your site have permission to edit the existing and future content on your site.
Figure 4. Dialog window prompting field permissions configuration and confirming configuration save
The permissions configurations in Drupal are quite powerful and are, for the most part, beyond the scope of this tutorial. As you are still logged in as the administrator for your site, no further permissions modifications are necessary for you at this time. Suffice it to say that if you wanted to, you could allow authenticated members of your site (or even anonymous users) to submit, edit, and otherwise maintain content on the site, down to the individual fields of a Drupal node. This latter part will probably make more sense when you create an example of a new content type as you move along in this tutorial.
Because you've installed and enabled the CCK module in Drupal, you're ready to create new, custom content types that differ from the built-in content types for Drupal nodes such as page and story. This process of creating a new type allows you to treat the content, permissions, and forms for creating your custom content site differently from the other useful Drupal built-in types that you continue to use for the other, general-use sections of your site that (for good reason) are not necessarily composed in standards-based XML.
Here, we go over the creation of a custom content type that is based on TEI XML, and we call the new content type the TEI XML Document type because that's the basic and probably the most common implementation of TEI XML. We should add that digital publications often have several custom content types that allow for different forms of content, including audio interviews, video presentations, and other multimedia forms, with accompanying textual transcripts. It's possible as well, using precisely the same steps that we describe later for the TEI XML Document type, to create these content types and to enable XML input for their textual components.
The first step in creating a new content type is to navigate to the content management menu of the Administer section and choose Content Types (Administer > Content management > Content types). On that page, you see a link to add a new content type. When you click Add content type, you see something that resembles Figure 5.
Figure 5. Create a new content type
To identify the new content type, enter a Name, Type, and Description. We filled in a human-readable version of the new content type's name,
TEI XML Document—a name that's useful for us and others who might be contributing to our site—and a general description of the content type. The machine-readable version of the content type name,
Document, is, as it says on the page, used for constructing URLs, site links, and so on, that do not allow the spaces and punctuation that we humans are so fond of.
Click the Save content type button to create your new content type in Drupal. You will see the human-readable name you assigned to the new type in the confirmation dialog as in Figure 6.
Figure 6. Dialog window confirming creation of TEI XML document content type
You are almost ready to add site content, but first, you have to finish configuring the other module that you installed and enabled previously (the XML Content module). Then you can configure your TEI XML Document type to use and enforce standards-based XML as its underlying content.
With the XML Content module enabled, it's time to configure Drupal to use it. You have to add a new input format to let Drupal know that, in addition to its default input formats (usually Filtered HTML and Full HTML for most content node types), you want to include a TEI XML input type that uses your newly installed XML Content module to filter and administer it.
Navigate to the Add Input Filter screen in the administration panel (Administer > Site Configuration > Input Formats) and click Add input format (see Figure 7). In this case, name the input format TEI XML, as it is your intention to limit created or contributed content of your newly created TEI XML Document type to content that is both well-formed XML and valid according to the TEI standards-based XML schema that you create later in the tutorial.
Figure 7. Add XML as an input format
You've configured Drupal with the necessary modules, created the new TEI XML content type, and added XML as an input format. Next, create a schema to validate your XML documents and configure the schema within the XML Content module.