Enabling Drupal Modules

Text pages and stories are all very well, but you want to create a multimedia web site with social-networking features. To do this, you need to enable some extra modules for Drupal. Click the Administer link at left on the page, and, on the page of links that appears, find the "Site building" section. Under this heading is a link to the Modules page; click it, and you see a list of "Core - optional" modules with check boxes, including Blog, Book, Contact, Forum, Poll, Search, and Upload (see Figure 12-30). To enable one of these modules, check the corresponding box and click the "Save configuration" button at the foot of the page.

Core - option at


Aggregates syndicated content (R55, RDF, and Atom feeds).

Enables keeping easily and regularly updated user web pages or blags.

AIIdws users tD past content using applications that support XML-RPC blog APIs.

Allows users to structure site pages In a hierarchy or outilne.

AIIdws the user to change the color scheme dF certain ttiemes.

Allows users to comment on and discuss published content.

Required by: Forum (disabled), Tracker (disabled)

Enables the use Df bDth personal and site-wide contact Forms.

Allows content to be translated IntD different languages.

Depends ort Locale (disabled)

Figure 12-30. The Drupal tarball includes a number of optional modules you can use to add features to your site.

The optional modules that are bundled with the standard Drupal tarball don't include modules for handling image files, video, or audio specifically, although the Upload module allows site visitors to attach any one of these files to a page, story, blog entry, or forum post that they create.

To install one of the third-party modules available for Drupal, follow the link to contributed modules from the Modules page of your site, which points to http://drupal.org/projects/modules. (I usually open this page in a new tab in Firefox, side by side with the web site I'm working on.) The search feature on the Drupal site should find one or more modules that do what you need. There are many of these contributed modules available, and some work more smoothly than others. Module versions that are still under development may be tagged with a -dev, -alpha, or -beta suffix. For a production site, it's a good idea to go with the recommended release version of the module, even if that's a little older.

It's also important to make sure you're installing a compatible module, for Drupal 6 in this case. Plenty of people are still using the earlier Drupal 5 CMS, so modules are available for that version too. Some modules are being ported to the forthcoming Drupal 7 system, but that's strictly bleeding edge for now. The Drupal web site's Modules page has a handy "Filter by compatibility" link at right.

Enabled Name Version

G Aggregator 6.13

lil Comment 6.13


Contributed modules are supplied as tarballs, which must be unpacked in the correct directory on the server. In the following example you install the Image module. It's tagged as an alpha version in Figure 12-31, but it works well enough. First, download the tarball by clicking the relevant link on the Modules page of the Drupal web site.

Opening ¡mBge-6.x-1.0-a[phn5.tar.g ltMj have chosen to open Q ima9e-6.x-l.O-alphaS.tar.c1z which is a; Gzip archive from: http://ftp.dnjpai.org

What should Firefox do with this file?

O Qpen with Archive Manager (defaüt)

@ Save File

U Do this automatically tortile; like this from now or.


Figure 12-31. A wide variety of third-party contributed modules are available for Drupal, covering nearly all the features required for a typical Web 2.0 site.

Then, create the directory for contributed modules, which belongs under the sites/all/ directory of your Drupal installation, using the mkdir command:

sudo mkdir /usr/share/drupal6/sites/all/modules

Change to the directory containing the module tarball—for example, the Desktop directory—and then move the tarball to the new directory you just created:

cd Desktop sudo mv image-6.x-1.0-alpha5.tar.gz /usr/share/drupal6/sites/all/modules/

Now, change to the new contributed modules directory, and unpack the tarball:

cd /usr/share/drupal6/sites/all/modules/ sudo tar -xvzf image-6.x-1.0-alpha5.tar.gz

(The exact filename of the tarball will no doubt be different.) Return to the Modules administration page of your Drupal site, and refresh it in your browser. At the end of the page is a new section showing your freshly installed module, together with any dependent submodules the tarball contained (see Figure 12-32). New modules are switched off by default; check the boxes under the Enabled column for the modules you require, and then click the "Save configuration" button.

Figure 12-32. Don't forget to enable your new module after installation, or you won't see it working.

Finally, visit the Administer by Module page to set specific options for your newly installed module. On a local Ubuntu installation, this page is at http://localhost/drupal6/?q=admin/by-module. Scroll down until you find the section for Image. There are also sections for configuring the submodules, such as Image Gallery. For the parent module, Image, there are three links: "Configure permissions," "Images", and "Get Help"—the latter is a link to the locally installed Drupal documentation, within the web site. The Permissions page is very important, because here you set whom you allow to do what with your web site (see Figure 12-33).

<* Permissions | Free Software ... Q

Permission image module

anonymous user

authenticated user

create Images


edrt images

edit own images

view original images


imagegallery module

administer images


image import module import images image import module import images

Figure 12-33. Think carefully about permissions for any newly installed modules before allowing just anyone to use them.

By default, Drupal site visitors fall into two categories: anonymous, which includes any random person browsing the site, and authenticated, who are the people you allow to register. You probably don't want anonymous users to be able to create image nodes (picture pages), for instance. If you want a private site and don't want strangers registering for accounts, you can specify this on the "User settings" page, for example on an Ubuntu machine: http://localhost/drupal6/?q=admin/user/settings.

By visiting the Images page, you can set the name of the directory where uploaded pictures are stored (the default is images), the maximum file size you allow site visitors to upload, and the pixel dimensions for full-size images and thumbnails (see Figure 12-34).

Figure 12-34. Set the default image path and maximum upload size allowed on the Images page.
0 0

Post a comment