Table Of Content5629_FM_final.qxd 11/16/05 4:11 PM Page i
Building Online
Communities with
Drupal, phpBB, and
WordPress
Robert T. Douglass, Mike Little,
and Jared W. Smith
5629_FM_final.qxd 11/16/05 4:11 PM Page ii
Building Online Communities with Drupal,phpBB,and WordPress
Copyright © 2006 by Robert T.Douglass,Mike Little,and Jared W.Smith
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any information storage or retrieval
system, without the prior written permission of the copyright owner and the publisher.
ISBN (pbk): 1-59059-562-9
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence
of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
Lead Editor: Matt Wade
Technical Reviewers: Steve Potts, James Walker
Editorial Board: Steve Anglin, Dan Appleman, Ewan Buckingham, Gary Cornell, Tony Davis, Jason Gilmore,
Jonathan Hassell, Chris Mills, Dominic Shakeshaft, Jim Sumser
Project Manager: Sofia Marchant
Copy Edit Manager: Nicole LeClerc
Copy Editor: Marilyn Smith
Assistant Production Director: Kari Brooks-Copony
Production Editor: Lori Bring
Compositor: Linda Weidemann
Proofreader: Linda Seifert
Indexer: Rebecca Plunkett
Artist: Kinetic Publishing Services, LLC
Cover Designer: Kurt Krames
Manufacturing Director: Tom Debolski
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor,
New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or
visit http://www.springeronline.com.
For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley,
CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit http://www.apress.com.
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution
has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to
any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly
by the information contained in this work.
The source code for this book is available to readers at http://www.apress.comin the Source Code section.
5629_FM_final.qxd 11/16/05 4:11 PM Page iii
I’m dedicating my portion of this book to my Aunt Sobeida Linder,
whose inspiring spirit in the face of nearly impossible odds sets an example
we can all admire and try to live up to.She personified the phrase
“live life to the fullest,”as she did exactly that with every day she had,
good days and bad.We miss you tremendously.
Jared Smith
5629_FM_final.qxd 11/16/05 4:11 PM Page iv
5629_FM_final.qxd 11/16/05 4:11 PM Page v
Contents at a Glance
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
About the Technical Reviewers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
PART 1 ■ ■ ■ Drupal
■ CHAPTER 1 Introducing Drupal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
■ CHAPTER 2 Configuring Drupal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
■ CHAPTER 3 Using the Drupal Core Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
■ CHAPTER 4 Adding Contributed Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
■ CHAPTER 5 Adding and Customizing Themes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
■ CHAPTER 6 Maintaining Your Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
PART 2 ■ ■ ■ phpBB
■ CHAPTER 7 Introducing phpBB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
■ CHAPTER 8 Installing and Configuring phpBB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
■ CHAPTER 9 Touring phpBB’s Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
■ CHAPTER 10 Securing and Maintaining phpBB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
■ CHAPTER 11 Modifying phpBB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
■ CHAPTER 12 Styling phpBB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
PART 3 ■ ■ ■ WordPress
■ CHAPTER 13 Introducing WordPress. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
■ CHAPTER 14 Installing and Configuring WordPress. . . . . . . . . . . . . . . . . . . . . . . . . . 379
■ CHAPTER 15 Starting to Blog and Building Your Community. . . . . . . . . . . . . . . . . 401
■ CHAPTER 16 Changing the Look of Your Blog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
■ CHAPTER 17 Customizing Your Blog’s Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
■ CHAPTER 18 Maintaining Your Blog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
■ INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
v
5629_FM_final.qxd 11/16/05 4:11 PM Page vi
5629_FM_final.qxd 11/16/05 4:11 PM Page vii
Contents
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
About the Technical Reviewers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
PART 1 ■ ■ ■ Drupal
■ CHAPTER 1 Introducing Drupal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
What Is Drupal?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Who Should Use Drupal?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Installing Drupal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Meeting Drupal Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Obtaining Drupal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Setting Up the Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Setting the Database and Base URLs. . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Accessing the Drupal Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Troubleshooting Installation Problems. . . . . . . . . . . . . . . . . . . . . . . . . . 9
Creating the First User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Creating the files Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Using Other Installation Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Creating Drupal Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Adding a News Story. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Changing the Front Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Touring Drupal’s Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Introducing Themes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Introducing Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Introducing Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Introducing Nodes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Introducing Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Introducing Taxonomy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
vii
5629_FM_final.qxd 11/16/05 4:11 PM Page viii
viii ■ CONTENTS
■ CHAPTER 2 Configuring Drupal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Configuring Site Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
General Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Error Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Cache Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
File System Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Image Handling Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
RSS Feed Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Date Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
String Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Setting Up and Maintaining User Accounts . . . . . . . . . . . . . . . . . . . . . . . . . 30
Configuring User Accounts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Managing User Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Controlling Access. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Using Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Using Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Administering Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Adding Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Managing Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Configuring Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Filtering Content. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Viewing,Searching,and Updating Content. . . . . . . . . . . . . . . . . . . . . 48
Managing Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Configuring Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Managing the Comment Approval Queue . . . . . . . . . . . . . . . . . . . . . . 50
Configuring Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Enabling Themes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Choosing Theme Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Using Categories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Understanding Vocabularies and Terms. . . . . . . . . . . . . . . . . . . . . . . . 53
Configuring Categories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Leveraging Categories with Custom URLs . . . . . . . . . . . . . . . . . . . . . 56
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5629_FM_final.qxd 11/16/05 4:11 PM Page ix
■ CONTENTS ix
■ CHAPTER 3 Using the Drupal Core Modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Aggregator Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Identifying Feeds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Configuring Feeds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Viewing Feeds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Archive Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Block Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Blog Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Configuring Blogs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Accessing Blogs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
BlogAPI Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Configuring BlogAPI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Publishing to Your Site Using BlogAPI. . . . . . . . . . . . . . . . . . . . . . . . . . 66
Book Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Using Book Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Working with the Book Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Viewing Book Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Comment Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Contact Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Using the Personal Contact Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Using the Sitewide Contact Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Drupal Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Using Distributed Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Running a Directory Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Configuring the Drupal Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Filter Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Forum Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Configuring Containers and Forums. . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Setting Up Forum Categories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Help Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Legacy Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Locale Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Enabling and Importing Translations . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Translating Strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Exporting Translations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79