Skip to main content
main-content

Über dieses Buch

The Definitive Guide to Drupal 7 is the most comprehensive book for getting sites done using the powerful and extensible Drupal content management system. Written by a panel of expert authors, the book covers every aspect of Drupal, from planning a successful project all the way up to making a living from designing Drupal sites and to contributing to the Drupal community yourself. With this book you will:

Follow practical approaches to solving many online communication needs with Drupal with real examples. Learn how to keep learning about Drupal: administration, development, theming, design, and architecture. Go beyond the code to engage with the Drupal community as a contributing member and to do Drupal sustainably as a business.

The Definitive Guide to Drupal 7 was written by the following team of expert Drupal authors:

Benjamin Melançon, Jacine Luisi, Károly Négyesi, Greg Anderson, Bojhan Somers, Stéphane Corlosquet, Stefan Freudenberg, Michelle Lauer, Ed Carlevale, Florian Lorétan, Dani Nordin, Ryan Szrama, Susan Stewart, Jake Strawn, Brian Travis, Dan Hakimzadeh, Amye Scavarda, Albert Albala, Allie Micka, Robert Douglass, Robin Monks, Roy Scholten, Peter Wolanin, Kay VanValkenburgh, Greg Stout, Kasey Qynn Dolin, Mike Gifford, Claudina Sarahe, Sam Boyer, and Forest Mars, with contributions from George Cassie, Mike Ryan, Nathaniel Catchpole, and Dmitri Gaskin.

For more information, check out the Drupaleasy podcast #63, in which author Benjamin Melançon discusses The Definitive Guide to Drupal 7 in great detail:

http://drupaleasy.com/podcast/2011/08/drupaleasy-podcast-63-epic

Inhaltsverzeichnis

Frontmatter

Getting Started

Frontmatter

Chapter 1. Building a Drupal 7 Site

This book will accelerate you along Drupal’s learning curve by covering all aspects of building web sites with Drupal 7: architecture and configuration; module development; front end development; running projects sustainably; and contributing to Drupal’s code, documentation, and community.

Benjamin Melançon, Dan Hakimzadeh, Dani Nordin

Chapter 2. Essential Tools: Drush and Git

Whether building sites, developing themes or modules, or trying to make a Drupal distribution that can drive your car, Drush (the Drupal shell) and Git (the open source version control system) will help you get where you are going quickly and safely. This chapter will give you a brief overview of Drush and Git and then it will help you get started with these powerful tools. If you are already familiar with Drush, or want to go deeper into all of the things that you can do with it, check out Chapter 26, “Drush.”

Dani Nordin, Benjamin Melançon

Site Building Foundations

Frontmatter

Chapter 3. Building Dynamic Pages Using Views

Views changed my life. If you have built dynamic web sites for any period of time, you know that there are two main tasks that you perform over and over. You create content and store it in a database and then requests nuggets ofthat content to build stuff for your web pages. The latter requesting often requires complex formulas where the slightest typo will return you the wrong items or, more likely, nothing at all.

Michelle Lauer, Greg Stout

Chapter 4. There’s a Module for That

When building a Drupal site, “there’s a module for that” can be the sweetest words you can hear. Modules are nicely packaged bits of code that extend what Drupal can do. With thousands of contributed modules, the odds are good that someone has written one that does something close to what you need. The main challenge, then, is two-fold:

1.

Figuring out exactly what you need.

2.

Finding the best module to accomplish that goal.

Dani Nordin, Dan Hakimzadeh, Benjamin Melançon

Chapter 5. Creating Community Web Sites with Organic Groups

Many aspects of Drupal will be recognized as revolutionary in the years to come, but the revolution, still largely undeveloped, has to do with the power buried within the Roles and Permissions settings. Most web platforms offer two or three roles, some variant on User, Member, Administrator, then call it a day. The exception is Facebook, of course, with its brilliant interface and variations on Friend categories. Facebook turns its Users into Administrators and its Visitors into Contributors, and that’s a redivision of duties that both Marx and Wall Street would applaud.

Ed Carlevale

Chapter 6. Security in Drupal

The Internet is rife with spammers and hackers threatening to deface or take down your site, ruin your brand, paralyze your community, or steal confidential data. Whether you are a site administrator, module developer, themer, system administrator, or user, you ought to bear security in mind when administering your site or writing code. You could put your own site or other people’s sites at risk if you don’t follow some simple rules and best practices. Fortunately, you are not alone in this situation, and the Drupal community has developed a solid process to help you avoid major headaches when dealing with security matters.

Stéphane Corlosquet

Chapter 7. Updating Drupal

Updating Drupal 7 means staying within Drupal 7. This is known as a minor version update. In Drupal core, the version numbers for a minor update such as the second and third updates to the Drupal 7 release look like 7.2 to 7.3. In contributed modules, version numbers for minor updates such as the eleventh and twelfth updates to the second version of a module for Drupal 7 look like 7.x-2.11 to 7.x-2.12. (Drupal version numbers do not have leading zeros, which can be confusing. Remember that the order is 7.1, 7.2, ⋯ 7.8, 7.9, 7.10, 7.11.)

Benjamin Melançon

Chapter 8. Extending Your Site

Chapter 1 got you started with a Drupal site, Chapter 3 taught you the power of the Views module, and Chapter 4 gave you a sense of the variety of modules available for you to use. This chapter shows how far you can go building a site with fields and views, optional core modules, and chosen contributed modules—in short, configuring your site to within an inch of its life.

Dan Hakimzadeh, Benjamin Melançon

Making Your Life Easier

Frontmatter

Chapter 9. Drupal Community: Getting Help and Getting Involved

You might be wondering how Drupal is made and where its thousands of contributed modules, themes, features, profiles, and other resources come from. The Drupal community is a somewhat nebulous concept from an outsider’s perspective. Who are these people? What makes them part of the community? What’s in it for me?

Ben Melançon, Susan Stewart

Chapter 10. Planning and Managing a Drupal Project

Welcome! This chapter is about planning and managing Drupal web site projects. You’ve seen what Drupal has to offer, and you’re ready to build yourself a web site.

Amye Scavarda

Chapter 11. Documenting for End Users and the Production Team

Documentation is one of those things that many designers and developers hate doing, but it’s important—not only for the happiness of clients and editors who have to take over a site but also for preventing the production team from making the same mistakes over and over again.

Dani Nordin

Chapter 12. Development Environment

Pay special attention to this chapter. The topic may be as glamorous as visiting Home Depot on a first date, but this chapter will spare you reinventing the wheel. Whether you intend it or not, when you start a project of any sort, you set up a development environment: you choose tools and create spaces that define your processes and either limit or advance your efforts. So here’s your chance to capitalize on the mistakes of others. In this chapter, I’ll look at efficient, interrelated tools and appropriately defined spaces. I will focus on a handful of possible approaches, each of which takes minimal setup and maintenance. The result will be a development environment that positions your projects to run smoothly, that builds in flexibility for changes in size and complexity of projects and teams, and that lets you focus your energy on deliverables rather than on tinkering with an inadequate setup.

Kay Van Valkenburgh

Chapter 13. Putting a Site Online and Deploying New Features

If only you can see it, your Drupal site isn’t quite as useful as it could be. If something happens to it, and you can’t restore it, that’s really bad. If you need to take the site offline for a week to add a complex new feature, that’s not great either. This chapter covers putting your site online, backing it up, and then treads lightly into Drupal’s new frontier of deploying major features.

Benjamin Melançon, Stefan Freudenberg

Chapter 14. Developing from a Human Mindset

This book seeks to give you the tools to understand Drupal, to use it to do great things, and to contribute back to the Drupal community. This chapter will help in making your work not just highly productive but a source of joy.

Károly Négyesi

Front-End Development

Frontmatter

Chapter 15. Theming

Drupal’s theme layer, and the themes that use it, are responsible for the look and feel of a Drupal web site. Good themes consist of all the same elements that you would find on any reputable web site, including standards-compliant XHTML markup, CSS, and JavaScript. How it all comes together is what is so special and what makes Drupal themes so flexible and powerful.

Jacine Luisi

Chapter 16. Advanced Theming

One of the best things about Drupal’s theme layer is the sheer amount of flexibility it provides. In the previous chapter you learned the basics of creating a theme: working with .info files, template files, and theme functions. When implementing more custom themes, sometimes these tools alone are not enough and you need to dig deeper. This is the point where the line between front-end developer and back-end developer gets a little blurry, but stay with us.

Jacine Luisi

Chapter 17. jQuery

jQuery has become an essential part of Drupal since Drupal 5. Many of the interfaces in the administrative area use jQuery to enhance the user experience, and Drupal 7 is no exception, continuing to improve the ability for developers and themers to implement advanced JavaScript functionality.

Jake Strawn, Dmitri Gaskin

Back-End Development

Frontmatter

Chapter 18. Introduction to Module Development

By now, you know that Drupal is a powerful and modular system. Indeed, much of Drupal’s power is in its modules, dynamos of drop-in functionality that build on Drupal’s base system and on one another to do wonderful things.

Benjamin Melançon

Chapter 19. Using Drupal’s APIs in a Module

The nature of the game in making modules for Drupal is using the tools Drupal provides you. API stands for Application Programming Interface and is a fancy way of saying that code has clearly defined ways of talking to other code. This chapter is devoted to introducing APIs, the hooks and functions Drupal provides to you, in the context of building the X-ray module introduced in Chapter 18. As each feature of the module requires using another tool from the extensive selection in Drupal’s API toolbox, I will introduce it and use it.

Benjamin Melançon

Chapter 20. Refining Your Module

Chapters 18 and 19 have shown you how to write your module, but there’s more to a module than just the code you’ve written. In this chapter you’ll see how to:

Create a configuration page and settings form.

Refine your module into a drupal.org-worthy module, including fixing errors and reviewing for coding standards.

Benjamin Melançon

Chapter 21. Porting Modules to Drupal 7

Drupal, like many open source projects, relies on volunteer contributors to keep its ecosystem of development active and current. This is one of the key strengths of open source software; the downside is that people who used to volunteer time to Drupal often drop out when other commitments take over.

Robin Monks, Benjamin Melançon

Chapter 22. Writing Project-Specific Code

One of the great strengths of Drupal is the wide selection of available modules, providing everything from the integration of external media to complex access restrictions, with many modules expanding standard functionality to fit specific use cases.

Florian Lorétan

Chapter 23. Introduction to Functional Testing with Simpletest

The release of Drupal 7 marks a turning point, specifically with regards to automated testing, as it allows core and contributed module developers to validate that their code works as intended. Because content management systems were originally designed for simpler web sites, the relative complexity of automated testing has traditionally made it a low priority. However, in recent releases, and especially with version 7, Drupal has become much more than a simple content management system. It is a

platform

, a complex application making use of modern concepts such as exception handling, objectoriented programming, and, yes, automated testing.

Albert Albala

Chapter 24. Writing a Major Module

The dictionary definition of “module” is “one of multiple distinct but interrelated parts that can be used to construct a more complex structure.” That describes how complex web sites are built with Drupal: module by module. (And you didn’t think anything in Drupal was sensibly named.)

Benjamin Melançon

Advanced Site-Building Topics

Frontmatter

Chapter 25. Drupal Commerce

E-commerce with Drupal is more powerful than ever before thanks to the development of Drupal Commerce for Drupal 7. The Drupal Commerce project is comprised of a core set of Commerce modules and an implementation strategy that leverages the many new Drupal 7 features and API improvements. This chapter begins with a broad overview of Drupal Commerce, highlighting its key features before moving on to a closer examination of the core systems, their implementation, and how they should be used together. It also includes words of wisdom for site builders and developers seeking to implement Drupal Commerce on their own sites. The chapter ends with a discussion of the project’s development history, design philosophy, and utilization of key Drupal 7 features.

Ryan Szrama

Chapter 26. Drush

Drush is the Drupal shell’a program that allows you to examine and modify your Drupal site by entering instructions from the command line. It’s also a toolbox full of useful utilities and a scripting environment to help you quickly divide, conquer, and control your Drupal sites.

Greg Anderson

Chapter 27. Scaling Drupal

To define scaling, let“s look at a little café. When it opens up, because it’s little, the owner does everything: she takes the order, prepares the drink, and takes the payment in exchange for the coffee. Some time passes and the café becomes popular so the owner hires a barista and a waiter. Now the waiter takes the order and gets the money. The barista gets a slip with the order, prepares the drink, and gives it to the customer. What you should notice here is that when one person did everything, the exchange of the money and the drink happened at the same time. But now the customer hands over the money first and only eventually gets a drink. Is there a risk involved with handing over money before getting the coffee? If a fire broke out suddenly, the customer would have paid his money but received nothing in exchange. However, no one is really bothered by this possibility; they would rather take this extremely small risk in order to get their coffee a lot faster. By separating the “taking of money” and the “serving coffee” actions, the shop can serve a lot more customers a lot faster. It can hire any number of baristas and any number of cashiers to better accommodate the traffic. This is scaling: to accommodate the traffic in such a way that more customers do not slow down the process.

Károly Négyesi

Chapter 28. Spice Your Content Up With Tasty Semantics

It used to be that search engines had to guess which parts of a page to show to make your site look relevant and attractive in their search results. Now Drupal gives you the tools to clearly express what meaning your content carries, thus helping other applications on the Web to truly understand your site and reuse your content in potentially useful and attractive ways (see Figure 28-1).

Stéphane Corlosquet

Chapter 29. The Menu System and the Path Into Drupal

A versatile and easily understood architecture sets the stage for wide community involvement, as exemplified by Drupal’s menu system—responsible for associating paths on a Drupal site with just what the site returns to the visitor.

Robert Douglass

Chapter 30. Under the Hood: Inside Drupal When It Displays a Page

The moment a web browser requests a page, Drupal begins running a complex series of steps that result in a fully rendered page being returned to the browser. With every page request, Drupal has to do those same calculations, so understanding them is key to making the best development decisions for your modules or sites.

Stefan Freudenberg

Chapter 31. Search and Apache Solr Integration

This chapter will discuss the Apache Solr Search Integration module in terms of how it implements the Drupal core Search module hooks, as an example of how to make a custom search, and in terms of its functionality. This chapter also highlights some of the additional hooks that allow the module’s behavior to be customized and extended. This module can be seen as an example of integrating Drupal with a web service, and it makes use of some object-oriented code.

Peter Wolanin

Chapter 32. User Experience

Learning how Drupal works takes a lot of time—and that’s just core. As modules get added, the complexity grows. As a Drupal developer, you don’t want this complexity to get in the way of users and site administrators getting the full benefit of your work. This creates some challenges in terms of design. How does this module fit together with all the other modules? How do we design Drupal administration to fit endless possibilities?

Bojhan Somers, Roy Scholten

Chapter 33. Completing a Site: The Other 90%

You’ve built out content types and views and blocks and menus (and if you haven’t, get back to Chapter 1). You’ve done some more of this and a bunch of other configuration, too (see Chapter 8). You’ve made a custom theme (see Chapters 15 and 16). The site is indisputably 90% built. It’s just that the final 10% can easily take as much time as you’ve already put in. Getting a site to done usually means a lot of messing and obsessing until everything works and looks just right.

Benjamin Melançon

Chapter 34. Drupal Distributions and Installation Profiles

Installation profiles are lists of Drupal modules and themes coupled with automatic configuration to allow you to quickly and easily create a full-featured site or development testbed. They are packaged within distributions, which guide you through the installation and provide the site code. For example, the default Drupal distribution ships with two profiles, standard and minimal. Standard enables a set of modules and configuration that will be useful for most sites; it also includes some placeholder content and examples that can be helpful for a new user exploring Drupal’s capabilities. Minimal installs just the barest set of modules and configuration needed for Drupal to run; it’s recommended for someone who knows just what modules the new site will need.

Florian Lorétan

Drupal Community

Frontmatter

Chapter 35. Drupal’s Story: A Chain of Many Unexpected Events

I considered titling this chapter “History,” but decided that that would be misleading. Even though the Drupal project is only ten years old at the time of this printing, a complete history of Drupal would fill hundreds of pages and document the experiences of literally hundreds of thousands of people.

Kasey Qynn Dolin

Chapter 36. Now You’re in Business: Making a Living with Drupal

You’re ready to strike out on your own and become the next Drupal rockstar! There’s plenty of work out there for experienced Drupal developers, and this book has armed you with the technical foundation you need to get started. To make a living, you just need to find people who are willing to pay you to do some work. Then you do that work and you get paid. It really is that simple!

Allie Micka

Chapter 37. Maintaining a Project

This principle — a slightly nicer version of “Put up or shut up”—has driven the Drupal community since it was barely big enough to deserve the community label. As the project has gotten bigger, the meaning of code has expanded to something more like contribution, encompassing the essential work of designers, documenters, and trainers without whom Drupal wouldn’t be book-worthy. In this chapter, though, we’re going to focus on that original definition: contributing code; more specifically, creating and maintaining a project on Drupal.org. We’ll also talk a bit about recommended development workflows, in particular ways to leverage Drupal’s chosen version control system, Git.

Sam Boyer, Forest Mars

Chapter 38. Contributing to the Community

There is a common misconception that you have to be a programmer in order to contribute to Drupal. This is untrue; even those with little or no prior knowledge of code can contribute to the community in ways that will help make Drupal better. In fact, this is what happens all the time: people support the Drupal community by organizing events, answering questions, and sponsoring development sprints—all examples of vital non-code contributions that the community needs to grow. Non-code contributions, such as mentorship and writing documentation, are ideal ways to develop and grow one’s skills in coding and configuring Drupal. Growing the community means, on the one hand, growing the infrastructure and number of people and, on the other, growing the capabilities of people in the community.

Benjamin Melançon, Claudina Sarahe

Backmatter

Weitere Informationen

Premium Partner

BranchenIndex Online

Die B2B-Firmensuche für Industrie und Wirtschaft: Kostenfrei in Firmenprofilen nach Lieferanten, Herstellern, Dienstleistern und Händlern recherchieren.

Whitepaper

- ANZEIGE -

Best Practices für die Mitarbeiter-Partizipation in der Produktentwicklung

Unternehmen haben das Innovationspotenzial der eigenen Mitarbeiter auch außerhalb der F&E-Abteilung erkannt. Viele Initiativen zur Partizipation scheitern in der Praxis jedoch häufig. Lesen Sie hier  - basierend auf einer qualitativ-explorativen Expertenstudie - mehr über die wesentlichen Problemfelder der mitarbeiterzentrierten Produktentwicklung und profitieren Sie von konkreten Handlungsempfehlungen aus der Praxis.
Jetzt gratis downloaden!

Bildnachweise