O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Drupal: Creating Blogs, Forums, Portals, and Community Websites

Book Description

Key Features

  • David Mercer's new Drupal 7 book is now here!
  • Install, configure, administer, maintain and extend Drupal.
  • Control access with users, roles and permissions
  • Structure your content using Drupal’s powerful CMS features
  • Includes coverage of  release 4.7

Book Description

Drupal is one of the most popular content management systems on the internet. Based on PHP/MySQL, its power and flexibility combined with its exceptional design mean it is already on the way to becoming the de facto standard for CMS Websites. Drupal’s modular design and structured source code make it both highly flexible and easily extended and modified. Drupal is extremely scalable, making it ideal for both a simple personal website as well as an industrial strength commercial or institutional web presence.

Drupal is a model open source project in that it has a large, friendly community of people who contribute to the project in various ways. Drupal is not only free and easy to use, but this community provides on going mutual support.

Drupal's power means choosing an initial pathway can be daunting. The flexibility and power of its content management features mean the right approach needs to be taken. This book takes you from initial set up through site design and creation in a series of carefully structured steps. While there are a few advanced topics that are beyond the scope of the book, all of the core stages of creating a website using Drupal are covered in detail.

What you will learn

Chapter 1 introduces you to the world of Drupal and looks at where Drupal comes from, where its going and what it can offer you. Because it is important to understand the nature of the tasks which lie ahead, it also discusses how to plan and build your website, taking a sneak preview of the book's demo Website in the process. Finally, we scrutinize the Drupal community and learn how to make the most of Drupal as an organized, living entity and not just a piece of software.

Chapter 2 deals with how to get everything you need up and running on a development machine and also briefly looks at how all the requisite technologies gel together to produce your working Drupal site. Once everything is up and running, and after looking over some of the more common installation problems, the chapter presents a short tour of Drupal in order to give you an idea of what to expect.

Chapter 3 looks at the most general settings which all Drupal administrators need to contend with. Everything from determining your site's name to dealing with the cache or file system settings gets treated here before we look at more focused and complex issues in the chapters to come.

Chapter 4 sees us adding functionality to the newly created site. The focus of this chapter is really on modules and how they can be added and enabled, or even how to obtain modules that are not part of the standard distribution. Since blocks are often required to display the functionality provided by modules, this chapter ends off with a discussion on how to control blocks.

Chapter 5 concerns itself with the topic of access control. Drupal has a sophisticated role based access control system, which is fundamentally important for controlling how users access your site. This chapter will give you the information you need to implement whatever access controls you require.

Chapter 6 gets to the heart of the matter by beginning the book's coverage on content. Working with content, what content types are available, administering content and even a discourse on some of the more common content related modules serve as a basis for moving to more advanced content related matters that follow in the next chapter.

Chapter 7 gives you the edge when it comes to creating engaging and dynamic content. While this chapter doesn't require you to be an expert in HTML, PHP and CSS it does introduce you to the basics and shows how, with a little knowledge, extremely powerful and professional content can be created. That's only half the story, because later on it looks at categorization and how this particular feature of Drupal sets it apart from everything else out there.

Chapter 8 gives you a run down of how attractive interfaces are created in Drupal through the use of themes. As well as discussing briefly some of the considerations that must be taken into account when planning your website, it ends off by looking at how to make important modifications to your chosen theme.

Chapter 9 really adds the icing on the cake by looking at a host of more advanced topics. From creating flexible content types and generating revenue from ads, all the way through to building dynamic content using Ajax, you will find something to enhance your website and add that something special.

Chapter 10 takes a pragmatic look at the type of tasks you will need to be proficient in in order to successfully run and maintain a Drupal site. Whether its setting up cron jobs or making backups of your database, everything you need to do throughout the course of running your newly created website will be covered here.

Appendix A deals with the all important topic of deployment. Because all major work should be done on a copy of your Website on a development machine, this appendix presents a sound process for taking the finished product and making it available for public consumption on your host site.

Who this book is for

This book will suit anyone who has a need to create a content rich website. Whether you are:

  • Adding a personal web page
  • Building a forum
  • Writing a collaborative book
  • Retailing goods
  • Creating a blog
  • Launching a community Website

This book will prove to be an indispensable companion. Both experts and beginners to computing alike will find the information contained herein to be accessible and easy to intuit.

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file.

Table of Contents

  1. Drupal
    1. Table of Contents
    2. Drupal
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. Preface
      1. What This Book Covers
      2. Conventions
      3. Reader Feedback
      4. Customer Support
        1. Downloading the Code for the Book
        2. Errata
        3. Questions
    7. 1. Introduction to Drupal
      1. Drupal—An Overview
      2. How Drupal Came to Be
      3. What Drupal Has to Offer
      4. Uses of Drupal
      5. Building a Drupal Site
        1. Planning Your Site
        2. Analyzing the Proposed Solution
          1. Feasibility
          2. Phone a Friend
          3. Critical versus Desirable Criteria
        3. The Demo Website
      6. The Drupal Community
        1. Support
        2. Handbooks
        3. Forum
        4. Downloads
        5. Contribute
        6. Contact and Community
      7. The Drupal License
      8. Summary
    8. 2. Setting Up the Development Environment
      1. The Drupal Environment
      2. Obtaining and Installing PHP, Apache, and MySQL
      3. Obtaining and Installing Drupal
      4. Upgrading Drupal
      5. Troubleshooting Common Problems
      6. A Short Tour of Drupal
        1. A Couple of Important Settings
        2. Creating an Administrative User
        3. Using the Administrative Panel
        4. A Sample Drupal Page
      7. Summary
    9. 3. Basics I: Site Configuration
      1. Before We Start
      2. General Settings
      3. Error Handling
      4. Cache and File System Settings
      5. RSS Feed Settings
      6. Date Settings
      7. Site Maintenance
      8. String Handling
      9. Summary
    10. 4. Basics II: Adding Functionality
      1. Adding Modules
      2. Third-Party Modules
        1. Downloading Modules
        2. Installing Modules
      3. Configuring Modules
        1. Forum
        2. Locale
        3. Comments
        4. Content Types
        5. Search
        6. Upload
      4. Menus and Primary Links
      5. Using Modules
      6. Working with Blocks
        1. Adding Blocks
        2. Configuring Blocks
      7. Summary
    11. 5. Users, Roles, and Permissions
      1. Planning an Access Policy
      2. Roles
      3. Permissions
        1. Setting Permissions with Taxonomy Access Control
      4. Users
        1. Administering Users
        2. Configuring Users
      5. Access Rules
      6. Summary
    12. 6. Basic Content
      1. Content Types
      2. Working with Content
        1. Content Options
        2. Administering Content
      3. Content-Related Modules
        1. Aggregator
        2. Archive
        3. Similar Entries
        4. Taxonomy Block
      4. Summary
    13. 7. Advanced Content
      1. HTML, PHP, and Content Posting
        1. Input Formats and Filters
        2. HTML
        3. Creating a Feature-Rich Page
        4. Posting a Feature-Rich Page
      2. Categorization
        1. What and Why?
        2. Implementing Taxonomies in Drupal
          1. Introduction to Vocabularies
          2. Dealing with Descriptors
          3. Posting Content with Categories Enabled
          4. Hierarchies
          5. Content Structure
      3. Summary
    14. 8. Drupal's Interface
      1. Planning a Web-Based Interface
        1. Visual Design
        2. Language
        3. Images
      2. How Drupal's Interface Works
      3. CSS
      4. Themes
        1. Choosing a Base Theme
        2. Configuring Your Themes
        3. Customizing Your Theme
        4. Images
        5. Colors
        6. Page Modifications
      5. Summary
    15. 9. Advanced Features and Modifications
      1. Flexinode
        1. Downloading and Installing Flexinode
        2. Creating a Custom Content Type
        3. Adding Structure
      2. AdSense
        1. Installing and Configuring AdSense
        2. Adding Google Ads to Your Pages
        3. Adding Google Ads to Your Content
      3. Advanced Site Modifications
        1. Scrolling News Ticker
          1. Obtaining the Ticker
          2. Creating the Content
        2. Dynamic Content Page
          1. Incorporating the Application into the Theme
          2. Building the Content Page
      4. Summary
    16. 10. Running Your Website
      1. Backups
        1. phpMyAdmin
        2. The mysqldump Utility
      2. Cron and Scheduled Tasks
        1. The Crontab
        2. Windows Scheduled Tasks
        3. Poormanscron
      3. Throttling
      4. Patching
      5. Website Activities
        1. Search Engine Optimization
        2. Maintaining Users
      6. Summary
    17. A. Deployment
      1. Getting Ready to Deploy
        1. Make Sure the Host Is Ready
        2. Get the Files Ready
        3. Get the Database Ready
      2. Transfer the Files
      3. Setting Up the Site
        1. Set Up the Files
        2. Set Up the Database
        3. Configure the Site
        4. Access Problem?
      4. Testing
      5. Summary
    18. Index