You are previewing Foundation Drupal 7.
O'Reilly logo
Foundation Drupal 7

Book Description

Drupal is a content management framework that powers web sites from simple online brochures to more advanced sites including social networking sites, blogs, e-commerce sites, business portals, and more. It is free, open source software that allows anyone to quickly and easily build web sites. Its full range of modules—including user permissions, security mechanisms, JavaScript menus, image uploaders, WYSIWYG editors, and more—helps you easily create the foundation for a powerful web site. With its templating system (and a few tips and tricks), any graphic design file can be used to create a Drupal web site.

Foundation Drupal 7 covers all the topics necessary to quickly build Drupal-powered web sites, explaining in simple terms how Drupal works and providing you with concepts, tips, and code snippets for every step of the development process. From setting up a Drupalready web host and installing Drupal to using the administrative interface and configuring a site from start to finish, there is something here for everyone. In addition to thoroughly discussing all of Drupal's core modules, this book reviews more than 50 contributed modules, including WYSIWYG HTML editors, JavaScript drop-down menus, web forms, and even the powerful Views module. Stephanie Pakrul, creator and maintainer of the Fusion theme, coauthors a chapter on how to lay out and add graphics to a site through Drupal's administrative section. After reading this book, you will walk away with everything you need to know to quickly and successfully build a Drupal-powered web site.

Whether you're an experienced Drupal site builder looking to expand your skills, a web developer or designer interested in learning Drupal, or a weekend hobbyist looking to build your first site, Foundation Drupal 7 will give you the knowledge and inspiration you need to bring your ideas to life.

Table of Contents

  1. Copyright
  2. About the Authors
  3. About the Technical Reviewer
  4. Acknowledgments
  5. Introduction
    1. Drupal as a content management system
    2. Why Drupal rocks
    3. What's in this book
    4. What's new in Drupal 7
    5. What you need to know
    6. Layout conventions
  6. 1. An Overview of Drupal
    1. 1.1. How Drupal works
      1. 1.1.1. Database powered
      2. 1.1.2. Organizing and displaying content
      3. 1.1.3. People, roles, and permissions
      4. 1.1.4. Adding functionality through modules
      5. 1.1.5. Themes
    2. 1.2. Navigating the administrative interface
    3. 1.3. Creating a web page
      1. 1.3.1. How to create a basic page
      2. 1.3.2. How to create a block
  7. 2. Setting Up a Web Host and Installing Drupal
    1. 2.1. How to select a web host
      1. 2.1.1. System requirements
      2. 2.1.2. Web host requirements
    2. 2.2. Setting up a web host with cPanel and WHM
      1. 2.2.1. Create a cPanel account with WHM
      2. 2.2.2. Adding a database and MySQL user with cPanel
    3. 2.3. Drupal's file and folder layout
      1. 2.3.1. Core files
      2. 2.3.2. The sites directory
      3. 2.3.3. Single-site and multisite installs
    4. 2.4. Downloading and installing Drupal
      1. 2.4.1. Download Drupal to your host
      2. 2.4.2. Creating a site-specific directory
      3. 2.4.3. Installing Drupal
    5. 2.5. Summary
  8. 3. Configuring a Basic Drupal Web Site
    1. 3.1. An iterative approach
    2. 3.2. Basic configuration settings
      1. 3.2.1. Site information
      2. 3.2.2. Cron
      3. 3.2.3. Regional settings
      4. 3.2.4. Date and time
      5. 3.2.5. Clean URLs
      6. 3.2.6. Configuring the file system and private downloads
    3. 3.3. Blocks
      1. 3.3.1. How blocks work
      2. 3.3.2. Moving and arranging blocks
      3. 3.3.3. Configuring a block
        1. 3.3.3.1. Block-specific settings
        2. 3.3.3.2. Region settings
        3. 3.3.3.3. Page-specific visibility settings
        4. 3.3.3.4. Content type-specific visibility settings
        5. 3.3.3.5. Role-specific visibility settings
        6. 3.3.3.6. User-specific visibility settings
    4. 3.4. Menus and menu links
      1. 3.4.1. Overview of Drupal's menu system
      2. 3.4.2. Default menus
        1. 3.4.2.1. Main menu
        2. 3.4.2.2. Management
        3. 3.4.2.3. Navigation
        4. 3.4.2.4. Secondary menu
        5. 3.4.2.5. User menu
      3. 3.4.3. Global menu settings
      4. 3.4.4. Adding a menu
      5. 3.4.5. Listing links
      6. 3.4.6. Creating a menu link
    5. 3.5. Setting up your front page
    6. 3.6. Appearance
      1. 3.6.1. Selecting a theme
      2. 3.6.2. Global and individual theme settings
    7. 3.7. Summary
  9. 4. Adding Content Types and Fields
    1. 4.1. What is a content type?
      1. 4.1.1. Knowing when to add a content type
    2. 4.2. Adding a content type
      1. 4.2.1. Fields and form settings available to a content type
      2. 4.2.2. Content publishing options
      3. 4.2.3. Displaying the author and publication date
      4. 4.2.4. Displaying comments
      5. 4.2.5. Menu settings
    3. 4.3. Adding fields to a content type
      1. 4.3.1. Adding field types
        1. 4.3.1.1. Text fields and boxes
        2. 4.3.1.2. Drop-down lists, check boxes, and radio buttons
        3. 4.3.1.3. Files and images
      2. 4.3.2. Managing the display of fields in multiple locations
        1. 4.3.2.1. Default view mode
        2. 4.3.2.2. RSS view mode
        3. 4.3.2.3. Search index and search result view modes
      3. 4.3.3. Adding comment fields and controlling how they display
    4. 4.4. Designing the taxonomy of your site
      1. 4.4.1.
        1. 4.4.1.1. Adding a vocabulary
        2. 4.4.1.2. Adding terms
        3. 4.4.1.3. Managing terms
    5. 4.5. Summary
  10. 5. People, Roles, and Permissions
    1. 5.1. An overview
    2. 5.2. How to add people
    3. 5.3. Customizing account settings
      1. 5.3.1. Anonymous users and administrator role
      2. 5.3.2. Registration and cancellation
      3. 5.3.3. Personalization
      4. 5.3.4. E-mails
    4. 5.4. Roles and permissions
    5. 5.5. IP address blocking
    6. 5.6. Summary
  11. 6. Enabling and Configuring Core Modules
    1. 6.1. Enabling a module
    2. 6.2. Aggregator
    3. 6.3. Blog
    4. 6.4. Book
    5. 6.5. Comments
    6. 6.6. Contact
    7. 6.7. Forum
    8. 6.8. Language translations, including locale and content translation
      1. 6.8.1. Setup instructions for the locale module
      2. 6.8.2. Setup instructions for the content translation module
    9. 6.9. OpenID
    10. 6.10. Poll
    11. 6.11. Tracker
    12. 6.12. Summary
  12. 7. Essential Contributed Modules
    1. 7.1. Adding and enabling a contributed module
    2. 7.2. Defining URL path patterns with Pathauto
      1. 7.2.1. Node, taxonomy term, and user path settings
      2. 7.2.2. General and punctuation settings
    3. 7.3. Using views to query and display data
      1. 7.3.1. The views administration UI
      2. 7.3.2. Adding a view
        1. 7.3.2.1. Settings
        2. 7.3.2.2. Display
        3. 7.3.2.3. Logic
        4. 7.3.2.4. Previewing and saving a view
      3. 7.3.3. Enabling and updating the front-page view
    4. 7.4. Entering content with WYSIWYG HTML editors
    5. 7.5. JavaScript menus with DHTML Menu
    6. 7.6. Creating forms with webform
      1. 7.6.1. Configuring the webform module
      2. 7.6.2. Creating a web form
    7. 7.7. Spam control with Mollom
    8. 7.8. Site statistics with Google Analytics
    9. 7.9. Summary
  13. 8. Theming a Drupal Website
    1. 8.1. Build first, then theme
    2. 8.2. Using a Drupal theming framework: Fusion
      1. 8.2.1. Installing Fusion core
      2. 8.2.2. Installing a Fusion sub-theme
      3. 8.2.3. Install Skinr
    3. 8.3. Creating your layout
      1. 8.3.1. Planning your theme
      2. 8.3.2. Theme settings
      3. 8.3.3. Working with the grid layout
        1. 8.3.3.1. Theme widths
        2. 8.3.3.2. Changing the sidebars
        3. 8.3.3.3. Get content in the right places on the page
        4. 8.3.3.4. Adjust block widths and alignment
    4. 8.4. Styling your site
      1. 8.4.1. Styling your site with Skinr
      2. 8.4.2. Styling your site with CSS
        1. 8.4.2.1. Using local.css
        2. 8.4.2.2. CSS styling basics
          1. 8.4.2.2.1. Tools
        3. 8.4.2.3. Example: styling the site name
    5. 8.5. Creating your own custom Drupal theme
      1. 8.5.1. Copy and edit Fusion's starter subtheme
      2. 8.5.2. Adding style to your theme
        1. 8.5.2.1. Writing your own CSS
        2. 8.5.2.2. Content-specific theming
    6. 8.6. Advanced topics
      1. 8.6.1. Doing more with Skinr
      2. 8.6.2. Using PHP and template files
        1. 8.6.2.1. Other template files
        2. 8.6.2.2. Using the template.php file
    7. 8.7. Summary
  14. 9. Designing for a Browser
    1. 9.1. The browser as the new canvas
    2. 9.2. Using a template-driven approach
    3. 9.3. Working with text
    4. 9.4. Configuring Photoshop and Illustrator for best results
      1. 9.4.1. Color settings
      2. 9.4.2. Creating pixel-perfect lines and shapes
        1. 9.4.2.1. Photoshop settings
        2. 9.4.2.2. Illustrator settings
      3. 9.4.3. Slicing, optimizing, and saving web site images
        1. 9.4.3.1. Using the Slice and Slice Select tools
        2. 9.4.3.2. Optimizing web site images
        3. 9.4.3.3. Saving images
    5. 9.5. Summary
  15. 10. Going Live
    1. 10.1. Getting prepared to move a site to production
    2. 10.2. Understanding the process
    3. 10.3. Setting up a staging site in cPanel
      1. 10.3.1. Step-by-step cPanel tutorial
      2. 10.3.2. Troubleshooting your staging site
    4. 10.4. Turning on your production site
      1. 10.4.1. Preparing the test site for production
      2. 10.4.2. Moving the test site to production
    5. 10.5. Summary
  16. 11. Maintaining and Updating a Drupal Site
    1. 11.1. Maintaining a production site
      1. 11.1.1. Signing up for and checking security alerts
      2. 11.1.2. Checking the reports section weekly
        1. 11.1.2.1. Enable the statistics module
        2. 11.1.2.2. Site health
    2. 11.2. Understanding the update process
      1. 11.2.1. Using the Update Manager module
      2. 11.2.2. How to update a contributed module via Drupal UI
      3. 11.2.3. How to update a contributed module via SSH
      4. 11.2.4. Updating Drupal core via SSH
    3. 11.3. Useful modules
      1. 11.3.1. How do I back up content?
      2. 11.3.2. How do I stage content?
      3. 11.3.3. How do I stage sites?
    4. 11.4. Summary
  17. 12. Translating Business Requirements to Drupal Functionality
    1. 12.1. Increase your knowledge of Drupal
      1. 12.1.1. Study other people's work
      2. 12.1.2. Create a module reference document
      3. 12.1.3. Network with Drupal developers
      4. 12.1.4. Learn Drupal best practices
    2. 12.2. Useful communication tools
      1. 12.2.1. Requirements gathering
      2. 12.2.2. Using wireframes
      3. 12.2.3. Create an estimated-time spreadsheet
    3. 12.3. Leverage the Drupal community
      1. 12.3.1. Navigating Drupal.org
      2. 12.3.2. Posting Guidelines
      3. 12.3.3. Finding the perfect functionality
        1. 12.3.3.1. Searching using the right keywords
        2. 12.3.3.2. Evaluating a module
    4. 12.4. Summary
  18. A. Drupal and Search Engine Optimization
    1. A.1. What is SEO?
    2. A.2. Important configuration changes
      1. A.2.1. Update the .htaccess file
      2. A.2.2. Enable title and alt fields for images
      3. A.2.3. Revise robots.txt
    3. A.3. SEO-friendly modules
      1. A.3.1. SEO Checklist
      2. A.3.2. Pathauto
      3. A.3.3. Path Redirect and Global Redirect
      4. A.3.4. Meta tags
      5. A.3.5. Page Titles
      6. A.3.6. Menu Attributes
      7. A.3.7. XML sitemap
      8. A.3.8. Boost
    4. A.4. Structure your theme
    5. A.5. Page Optimization
    6. A.6. How to emphasize content in a WYSIWYG editor
  19. B. Drush, the Command-Line Shell for Drupal
    1. B.1. What is Drush?
    2. B.2. Expanding Drush functionality through contributed modules
      1. B.2.1. Backup and Migrate
      2. B.2.2. Drush Cleanup
      3. B.2.3. Drush EM
      4. B.2.4. Drush Make
    3. B.3. How to install Drush on cPanel
    4. B.4. Popular Drush commands
  20. C. 50+ Contributed Modules to Spice Up Any Site
    1. C.1. Development tools
      1. C.1.1. Chaos tool suite
      2. C.1.2. Devel
      3. C.1.3. Drupal For Firebug
      4. C.1.4. Features
      5. C.1.5. Context
      6. C.1.6. Spaces
      7. C.1.7. Strongarm
    2. C.2. Site-building tools
      1. C.2.1. Automatic Nodetitles
      2. C.2.2. Custom Breadcrumbs
      3. C.2.3. Custom Search
      4. C.2.4. Flag
      5. C.2.5. Menu attributes
      6. C.2.6. Menu block
      7. C.2.7. Nice Menus
      8. C.2.8. Nodequeue
      9. C.2.9. Panels
      10. C.2.10. Rules
      11. C.2.11. Site map
      12. C.2.12. String Overrides
      13. C.2.13. Workflow
    3. C.3. Modules that add additional field types
      1. C.3.1. Content Construction Kit (CCK)
      2. C.3.2. Date
      3. C.3.3. Email
      4. C.3.4. Embedded Media Field
      5. C.3.5. Field Permissions
      6. C.3.6. Link
      7. C.3.7. Name
      8. C.3.8. Phone
    4. C.4. Site administration tools
      1. C.4.1. Administration menu
      2. C.4.2. Advanced help
      3. C.4.3. Content Management Filter
      4. C.4.4. Feedback
      5. C.4.5. LoginToboggan
      6. C.4.6. Transliteration
      7. C.4.7. User Protect
    5. C.5. Theming tools
      1. C.5.1. Content Template (Contemplate)
      2. C.5.2. Theme developer
      3. C.5.3. ThemeKey
      4. C.5.4. Zenophile
    6. C.6. JavaScript, jQuery, and Drupal
      1. C.6.1. Colorbox
      2. C.6.2. External Links
      3. C.6.3. jQuery UI
      4. C.6.4. jQuery plugins
      5. C.6.5. jQuery Update
      6. C.6.6. Superfish
      7. C.6.7. Quick Tabs
    7. C.7. Mass e-mail
    8. C.8. E-commerce for Drupal
    9. C.9. Social networking
      1. C.9.1. Drupal for Facebook
      2. C.9.2. Facebook-style Statuses (Microblog)
      3. C.9.3. Organic groups
      4. C.9.4. Privatemsg
      5. C.9.5. Twitter
      6. C.9.6. User Relationships
      7. C.9.7. User Points
  21. D. Views Recipes
    1. D.1. Article listing
    2. D.2. Archive
    3. D.3. Calendar
    4. D.4. Image slideshow
    5. D.5. Image gallery
    6. D.6. Promoted block