Accessibility

Table of Contents

Creating Drupal sites with Flash or Flex

Installing Drupal

The first step is to install the Drupal CMS onto a PHP-enabled server. I strongly recommend using your local machine for testing if possible. It's true there's quite a bit of groundwork needed to get this set up, but after the first time it can be done really quickly—and it pays you back many times over once you're up and running.

For more detailed information on installation, visit the Drupal 6 section of the Drupal online documentation.

This article assumes you are installing to the web root folder. You can install to any location, however, such as a subfolder or a subdomain without modification. Here are the basic steps to installing Drupal on a PHP-enabled server:

  1. Download Drupal 6.X (the version as of this writing is 6.12).
  2. Create a new database and user. If you have PHPMyAdmin installed, this can be done quickly via the Privileges screen (where you can find an option to create a database with the same name as the user you are creating and give them all rights to it immediately).
  3. Extract Drupal 6 into your web root (or a folder inside it depending on your desired setup and whether you will have multiple sites). Open it in your browser (for example, visit http://localhost).

    Note: Make sure you extract the Drupal ZIP file into the folder directly because you may miss the invisible .htaccess file if you just use Windows Explorer or the Mac OS X Finder to drag the files. Alternatively enable "show hidden" files on your system to copy this file manually.

  4. You should see an installation screen as Drupal redirects you to install.php. At this point enter the database information.
  5. Drupal will most likely have a problem writing to its settings.php file found in /sites/default, and it will point out that you need to temporarily give this folder write permissions.

    To do this on a Mac/Linux/Unix machine, open a command prompt, change to the sites folder, and type chmod a+w default. In Windows you can set the file permissions for the "Internet Guest Account" via the File Properties dialog box. Alternatively, if you are using FTP to access files on a remote server, you can usually add the write permissions using your FTP client. The Drupal site has detailed instructions on how to do this for most systems.

  6. Back in the Drupal installation, click Try Again and all should be well. On the next screen it tells you to remove those write permissions. To do this, type chmod a–w default.
  7. Drupal is now installed. Log in and play with it to see what you get straight out of the box; it's good to get familiar with it at this stage.

Using clean URLs and paths

When installing Drupal, you may have noticed an option for enabling "clean URLs." If not, don't panic, you can enable this via the Drupal administration screens later on. Either way, this option deserves some explanation.

When you access a page (or node) in Drupal in a web browser, the URL is in a format like http://mysite.com/?q=123, which is quite nondescriptive. Clean URLs do not contain query string variables; instead, they just contain an easy-to-read path made up of words and slashes only—for example, http://mysite.com/node/123. When clean URLs are enabled, the server needs to dynamically rewrite them into the query-string format that PHP understands. This makes the URLs much more descriptive to both users and search engines alike but still allows the underlying PHP engine to interpret the request correctly.

Follow the instructions on the Clean URLs page in Drupal via Administer > Site Configuration > Clean URLs. In most cases you just need to enable/install the mod_rewrite Apache module on your server if it is not already switched on, and/or allow .htaccess files to set the rules for your site's folder.

You'll be using the Path and Pathauto modules to allow you to specify custom paths, or aliases for your nodes. In this context, a path is the portion of the URL that appears after the slash that immediately follows the domain name. The paths in Drupal will match directly with the (SWFAddress) paths in ActionScript, giving you a one-to-one mapping between human-readable paths and the node IDs that uniquely identify the content. This is why the clean URLs option must be enabled if you want deep-linking in your site. (There are ways to work around this if you absolutely cannot enable clean URLs.)