What's New in Drupal 7

by Dani Nordin

Of course, every Drupal release is better than the last; otherwise, there'd be no point. However, a case can be made that Drupal 6 was a greater leap forward than any previous release, and that Drupal 7 is a still greater leap. The section highlights some of the more notable improvements.

images Note This book is written to be as useful to people who never used Drupal before as to those who have used it before Drupal 7. This seemed like a good approach given that the Drupal community roughly doubles in size after every major release.

Easier to Use

An entirely revamped administrative interface makes routine tasks easier, with many improvements added specifically for site builders and content editors (Figure 2).

Administrative toolbar: Navigation for administrative tasks is now provided by a Toolbar located at the top of the browser window. Toolbar access can be set via User Roles, and only the functionality already permitted to that Role will be available from the toolbar.

Shortcuts drawer: Below the administrative toolbar is the Shortcuts drawer, which can be toggled open or closed. A Plus or Minus icon on every administrative screen adds or removes a shortcut from the drawer. Shortcuts can be as general (a link to the Blocks page) or as specific as you like (a link to a specific view while you're still refining it). Also, shortcuts can be saved as sets, making it possible to create one set of shortcuts for a Site Editor, another set for administrators, etc.

Contextual links: Contextual links are noted by a small wrench icon when you hover over various pieces of site content, such as blocks, views, menu lists, and teasers. They provide one-click navigation to editing screens related to that piece of content, greatly reducing the clicks-per-task for most routine Drupal tasks. As importantly, contextual links provide a useful cheat-sheet for Drupal newcomers who may not know the source of the content they're trying to edit. After you have made your edits and saved the block, view, or menu, the contextual link then returns you to the original screen. Drupal 7 is filled with many small touches like that, and, taken together, they significantly improve the Drupal experience. For more information on the User Experience principles in Drupal 7, see Chapter 32 in this book.

images

Figure 2. Improvements to Drupal 7's administrative interface include 1) administrative toolbar, 2) shortcuts drawer, and 3) contextual links.

Drupal's new admin interface includes a number of other enhancements to the content creation and curation process, including a new Dashboard with a simple and powerful drag-and-drop interface that can be customized by site administrators to include recent content, comments/content in need of moderation, or any other block available to your Drupal site (see Figure 3).

images

Figure 3. The Drupal Dashboard gives site users a customized view of the information they need to perform content or user maintenance. Administrators can customize the dashboard depending on what individual site editors need.

More Flexible

With Drupal 7, you can define your own content structure and add custom fields to content, users, comments, and more—without adding modules. In addition to creating custom text and list fields, you can upload images directly into Drupal fields and create custom Image Styles to automatically scale and crop your images.

You can also extend your site with some of the over 1,000 modules available for Drupal 7 at the time of this writing. Many module and theme maintainers took and fulfilled the D7CX pledge, meaning that more contrib modules were ready for the new version of Drupal on the date of its release than ever before.

Drupal 7 also now supports different types of databases, including MariaDB 5.1.44 and greater, MySQL 5.0.15 and greater, PostgreSQL 8.3 and greater, or SQLite 3.x. This gives you more flexibility and control over your site's data.

More Scalable

Your Drupal 7 site will be fast, responsive, and able handle huge amounts of traffic thanks to improved JavaScript and CSS optimization, better caching, and more. Drupal 7 also requires PHP 5.2.4 or greater to run, which leads to better performance, but may require checking with your web host before installing or upgrading.

Other Changes in 7

In addition to the changes previously listed, the following important changes have also been incorporated into Drupal 7.

Install Modules and Themes Through the User Interface

In Drupal 7, you can now install contributed modules and themes directly in the Drupal interface, either by providing a link to an external source or uploading the file directly (see Figure 4). Similarly, you can update modules and themes directly through the Drupal UI, a vast improvement over previous versions of Drupal.

images

Figure 4. Installing a new module is easy through the Drupal interface.

New Core Themes and Enhancements

The new version of Drupal also includes several new default themes, including:

  • Bartik:The Drupal 7 default theme, a clean, multi-region theme that allows easier customization of colors, regions, and CSS style settings (Figure 5).
  • Seven:The Drupal 7 administration theme, a minimalist theme used in configuration overlays and administration pages.
  • Stark: A completely empty theme that provides a way to look under the hood at Drupal's default markup. This is useful for module and theme developers who need to see the markup that Drupal is spitting out before they start working.
images

Figure 5. Bartik, Drupal 7's new default theme

As good as the themes themselves are, what's important here is the explicit separation between web site theme and administrative theme, as Figure 6 indicates. Bartik is a sophisticated theme with 15 configurable regions. By contrast, Seven has only two regions, greatly simplifying the administrative interface.

images

Figure 6. Content regions available in Bartik and Seven themes

Enhancements to Content Entry and Organization

Drupal 7 includes many enhancements to the content entry screens, including a more intuitive interface, vertical tabs for key configuration areas, and the option to add summaries to content, which can be used in custom page views.

It also includes a revamped Taxonomy (content categorization) setup, which allows you to add images, descriptions, and fields to content categories, and even add links to them. This is useful for heavy-duty content sites and in theming, where a default image could be used to denote every piece of content in a specific category.

RDFa Support

RDFa provides a way to structure HTML output so that machines can tell the difference between calendar content, contact information, and other types of content. This not only provides built in SEO for your web site, it sets the stage for a host of other functional enhancements to your website.

For more information about RDFa, visit h3.org/TR/xhtml-rdfa-scenarios/.

Security and Testing Improvements

The release of Drupal 7 comes along with a variety of important security improvements, including:

  • Password hashes are salted (meaning, passwords cannot be cracked with a look-up table).
  • Unique key for cron.php to make Denial of Service attacks more difficult. (Note: This means you can't run it just by going to example.com/cron.php like you might be used to.)
  • Permissions have normal, human-oriented names and descriptions.
  • Filter permissions are on the main permissions page.
  • Allows choosing between public and private files on a per filefield basis.
  • The Test module (formerly Simpletest) is included in Drupalcore. This module helps you write tests to make sure your site and modules work as they should, and test your site after you make changes. See Chapter 23 for more information.

This is only a smattering of the tremendous changes that were made in Drupal 7. If you'd like to see all of the changes, visit drupal.org/about/new-in-drupal-7 and drupal.org/drupal-7-released.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.177.125