If you have spent much time developing websites with Drupal, then you have probably accumulated a list of favorite modules. These are the core and contributed modules that have proven themselves so useful, that building a new site without them is nearly unthinkable. Consequently, you may conclude that it is most efficient to integrate them into your own Drupal distribution, and then use it as a starting point for most if not all future projects based upon that version of Drupal. To do this, simply install, enable, and configure these modules only once, in a clean Drupal installation, and then save a snapshot of the results (both the files and the database). This article will look at the first phase of that process; a future article will look at the configuration phase.
Naturally the first step is to begin with a clean installation of Drupal 7. As of this writing, the most recent version is 7.20. In an earlier article, I considered a similar set of essential Drupal 6 modules. With Drupal 6, I found it made more sense to use the standard installation profile, instead of the minimal one, largely because I found most of the system settings and extra enabled modules in the standard profile to be worthwhile. But Drupal 7 introduced several new modules that are installed and enabled by default in the standard installation profile, and which I find annoying (for reasons explained in just a moment): Dashboard, Overlay, Shortcut, and Toolbar. So now I use the minimal profile as a starting point.
The Dashboard module consumes valuable space at the top of every page, and lists links to pages, which just as easily can be handled by browser bookmarks. The Overlay module reduces your working space, and obscures most of the page it is on top of, even though its purpose is supposedly to show you that page at the same time you are making changes and thereby provide context. It might be useful to people who can't remember they were working on a different page a moment ago. The Shortcut module adds to the top of every page a toolbar to which you can add links. Again, browser bookmarks come to the rescue, and without taking up vertical space in the viewport. The Toolbar module adds an administrative toolbar, with links to top-level administrative items. One of my favorite modules (covered below) does this job even better.
With each major version of Drupal, the capability of its core modules increases dramatically, and version 7 is no exception. Developers oftentimes focus on the functionality offered by contrib modules only, forgetting that some of the core modules are quite useful. Contextual links adds admin links to elements on the page, depending upon the context; for instance, a block will have a link to the block's configuration page. Field UI is the user interface for the Field API. File provides a file field type. Image provides tools for manipulating images. List provides list field types, such as selection lists. Menu allows one to modify the website menus. Number provides numeric field types. Options provides form widgets for check boxes, list boxes, and radio buttons. Path makes possible custom URLs, allowing one to embed search-engine-friendly keywords into those URLs.
I will next consider the 19 modules I find invaluable, in alphabetical order.
Anyone who has had to manually create numerous nodes of the same content type, one after another, knows how tedious it can be each time to have to find and click the links for "Create content" and then the content type itself. Add another solves that problem by providing a way to quickly start another node of the type just created.
According to the settings you choose on the given content type's configuration page, you can have a "Save and add another" button made available at the bottom of every node creation form.
Another option is to have a link added to the confirmation message that is displayed after a node is created.
Thirdly, the same link can be provided but in the form of an additional tab on the (created) node's page.
You can control what roles have permissions to use this functionality, as well as what roles can configure its settings.
Prior to the availability of the Administration menu module, anyone logged into the admin area of a Drupal website would soon grow tired of having to click from one page to the next, simply to arrive at a desired admin page. This module adds a black toolbar at the top of the page, containing links to the home page, the top-level of the Management menu, the current user's profile page, and the logout page. This menubar is similar to the core Toolbar mentioned earlier, but with drop-down menus that display on mouse hover, making navigation much faster.
Be sure to also enable the Administration menu Toolbar style submodule, as it greatly improves the appearance of the menu bar.
Chaos Tool Suite
In addition to being a requisite of such critical modules as Views, Chaos Tool Suite (CTools) offers the developer a collection of handy utilities and APIs, including several focused on form creation: multi-step forms, forms with Ajax, and forms whose elements are displayed based upon the values of other elements.
Several of the modules examined in this article focus on defining field types. One of these is Date, which is so popular that parts of it will be integrated into Drupal 8. This is understandable, given how frequently a content type needs to have one or more dates and/or times associated with it. I typically also enable the submodules Date All Day, Date API, Date Popup, Date Repeat API, Date Tools, and Date Views. That third one allows you to display date fields as popup calendars, which Internet users much prefer over text entry fields or list boxes.
Similar to CTools, Devel is a collection of modules that could be quite beneficial to anyone developing a Drupal-based website. The main module makes it possible to monitor a query log, page execution time, memory usage, Krumo backtrace of errors, and much more. It defines a block that lists links to all sorts of Drupal developer resources.
The submodule "Devel generate" is a terrific solution if and when you need to create dummy nodes, menus, and users for testing purposes.
Content types oftentimes need fields where visitors can enter email addresses. In such situations, Email Field is ideal.
This module can validate or encrypt email addresses, as well as turn them into mailto links. It integrates with both the Views and Rules modules.
The release of Drupal 7 heralded many underlying changes to the framework, including fieldable entities. That API is extended with the Entity API package, which aims to "provide a unified way to deal with entities and their properties. Additionally, it provides an entity CRUD controller, which helps simplifying the creation of new entity types". It is required by the Rules module, as well as Ubercart and Drupal Commerce. This package also includes the Entity tokens submodule.
Fast Permissions Administration
As you develop a website and add more modules and roles to it, the permissions configuration page can rapidly become quite long (with all the new modules' permissions) and wide (with each newly-added role). Fast Permissions Administration neatly mitigates this problem by allowing you to filter by text and by module name.
For instance, to see only those permissions containing the string "user", simply type that string into the Filter entry field. The filtering is not limited to whole words, and thus permissions containing "users" would also match and be displayed. You can also limit the permissions to a particular module, by adding its name after an "@" symbol, e.g., "user@devel". As with the first component, the module name does not have to be complete, e.g., "user@dev" works fine.
In the escalating war between search engines and content "farms", one inadvertent casualty can be any website that has published both regular Drupal URLs (e.g.,
http://www.example.com/?q=node/1) and clean ones (e.g.,
http://www.example.com/first-post), because search engines are now penalizing sites that appear to contain duplicate content at different URLs.
Global Redirect addresses this problem by performing a permanent redirect to the alias, with an HTTP status of 301. This is one of those "set and forget" modules. You will be glad that you are using it, even if you cannot immediately remember why.
A user of a Drupal website may find it disconcerting when, after he logs in, he first sees his profile page, by default. It most cases it would be better to automatically forward him to a more suitable page, such as the list of nodes in the system. Login Destination handles that. On its configuration page, simply create a rule, specify the destination Drupal path (e.g., admin/content), and the trigger that initiates the process.
The rule can also be restricted to redirect from only specified pages, and only for certain non-core roles.
What the Fast Permissions Administration module does for the permissions admin page, Module Filter does for the modules admin page.
As you type in the "Filter list" field, the modules displayed are limited to those whose names contain the entered string; it ignores descriptions and required modules. This allows you to quickly find modules without having to resort to Edit > Find in the browser.
The page title that appears in the title bar of a visitor's browser, is set by Drupal by default to the page name and site name, separated by a vertical bar. You can control this using Page Title, which lets you set alternative values for the <title> element and the <h1> element of a node.
Note that this module unfortunately does not support non-programmatic page-specific titles.
Drupal's core Path module allows you to assign friendlier URLs to pages, manually. But doing this for every new page becomes tedious, and would probably be neglected by end-users. Pathauto fixes this problem by automatically generating and assigning a URL based on the node's title, user name, user ID, etc.
Redirect 403 to User Login
If and when a user tries to visit a page to which she does not have access, Drupal will by default display an error page informing her of what happened. But this typically results from the user not being logged in. So it would make more sense to instead send her to a login page, and that is precisely what is made possible by Redirect 403 to User Login.
Remove Generator META tag
Search engines have, over the years, given progressively less weight to meta tags, including the useless 'Generator' tag. By default, Drupal adds <meta name="Generator" content="Drupal 7 (http://drupal.org)" /> to the <head> element of every page. The module Remove Generator META tag does just what its name implies, with no configuration needed.
With the release of Drupal version 7, much of the excellent Token module was moved into core, except for field and user profile tokens, as well as the token user interface. Consequently, countless modules still require Token to be installed and enabled.
When end-users upload files to a website you created for them, there is always the possibility that those filenames will contain control characters and other aberrations that can cause problems later. Transliteration automatically sanitizes the names of files uploaded by users, to formats safe for servers.
A module so useful that it is being added to core in Drupal 8, Views allows you to list, filter, sort, and format data from the database, using a GUI to create the query, without having to write any SQL.
Most Internet users are familiar with the "site map" pages found on most sizable websites. But most people are not familiar with the search engine equivalent, which are formatted as XML pages, and not HTML. XML sitemap generates those files for your site automatically. You should also enable the submodules XML sitemap engines, XML sitemap menu, and XML sitemap node.
For those of you who have discovered the joys of Drush, here are the two commands for downloading and enabling these contrib modules:
drush dl addanother admin_menu ctools date devel email entity fpa globalredirect login_destination module_filter page_title pathauto r4032login remove_generator token transliteration views xmlsitemap drush en --yes addanother admin_menu* ctools date date_all_day date_popup date_repeat date_repeat_field date_tools date_views devel email entity entity_token fpa globalredirect login_destination module_filter page_title pathauto r4032login remove_generator token transliteration views views_ui xmlsitemap xmlsitemap_engines xmlsitemap_menu xmlsitemap_node
You may find that some of the modules recommended here are unneeded for your particular projects, just as you may have other modules of your own that are favorites. But this could serve as a starting point for anyone relatively new to Drupal 7.