Out of the box, Drupal 7 performs all of the standard functions of a web-based
content management system. Visitors can view published information on the site,
navigate through menus, and view individual pages, complete with images. Users
can create accounts and leave comments. Administrators can manage the site
configuration and control the permissions levels of users. Editors can create content,
preview it, and then publish it when it is ready. Content can be syndicated to RSS,
where feed readers can pick up new articles as they are published. With several
built-in themes, even the look and feel of the site can easily be changed.
As fantastic as these features are, they will certainly not satisfy the needs of all users.
To that end, Drupal’s capabilities can be easily extended with modules, themes, and
installation profiles. Take a look at Drupal’s main website,
you will find thousands of modules that provide new features, and thousands of
themes that transform the look and feel of the site.
The fact that almost all aspects of Drupal’s behavior can be intercepted and
transformed through the module and theme mechanisms has lead many to claim
that Drupal isn’t just a Content Management System (CMS), but a Content
Management Framework (CMF) capable of being re-tooled to specific needs
and functional requirements.
Whether or not Drupal is rightly called a CMS or a CMF is beyond our present
interests, but it is certain that Drupal’s most tremendous asset is its extensibility. Want
to use a directory server for authentication? There’s a Drupal module for that. Want
to export data to CSV (Comma Separated Version) files? There are several modules
for that (depending on what data you want to export). Interested in Facebook
support, integration with Twitter, or adding a Share This button? Yup, there are
modules for all of these too—all of which are available at here.
Want to integrate Drupal with that custom tool you wrote to solve your specific
business needs? There may not be a module for that, but with a little bit of code,
you can write your own. In fact, that is the subject of this book.
The purpose of this book is to get you ramped up (as quickly as possible) for Drupal
development. As we move chapter by chapter through this book, we cover the
APIs and tools that you will use to build custom Drupal sites, and we don’t stick to
theory. Each chapter provides working, practically-oriented example code designed
to show you how to build code. We follow Drupal coding conventions and we
utilize Drupal design patterns in an effort to illustrate the correct way to write code.
While we certainly can’t write the exact code to meet your needs, our hope is that
the code mentioned in this chapter can serve as a foundation for your bigger and