apress building online communities with drupal, phpbb and wordpress - Pdf 13


Robert T. Douglass, Mike Little,
and Jared W. Smith
Building Online
Communities with
Drupal, phpBB, and
WordPress
5629_FM_final.qxd 11/16/05 4:11 PM Page i
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 987654321
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

■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 v
5629_FM_final.qxd 11/16/05 4:11 PM Page vi
Contents
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
About the Technical Reviewers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii

5629_FM_final.qxd 11/16/05 4:11 PM Page vii
■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

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
■CONTENTS
ix
5629_FM_final.qxd 11/16/05 4:11 PM Page ix
Menu Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Modifying Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Adding Custom Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Showing Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Adding Menu Links the Easy Way. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Resetting Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Node Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Page and Story Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Path Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Creating Path Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Creating Aliases to Drupal Paths. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Ping Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Poll Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Creating Polls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Administering Polls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Profile Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

Image Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Installing the Image Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Configuring the Image Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Uploading and Viewing Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Image Assist Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Installing the Image Assist Module . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Configuring the Image Assist Module. . . . . . . . . . . . . . . . . . . . . . . . . 110
Using Image Assist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
Flexinode Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Installing the Flexinode Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Adding Custom Node Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Event Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Installing the Event Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Configuring the Event Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Event-Enabling Node Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Viewing Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Exporting Event Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Location Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Installing the Location Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Configuring the Location Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Location-Enabling Node Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Organic Groups Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Installing the Organic Groups Module . . . . . . . . . . . . . . . . . . . . . . . . 131
Activating Group Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Configuring the Organic Groups Module . . . . . . . . . . . . . . . . . . . . . . 132
Configuring Organic Groups Albums. . . . . . . . . . . . . . . . . . . . . . . . . . 134
Creating Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Managing Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
■CONTENTS
xi

Using CSS for Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Creating a Custom Favicon.ico . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Using Theme-Related Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
■CONTENTSxii
5629_FM_final.qxd 11/16/05 4:11 PM Page xii
■CHAPTER 6 Maintaining Your Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Scheduling Automated Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Introducing Cron.php. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Calling Cron.php. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Running Multiple Drupal Sites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
Directing Requests for Multiple Sites. . . . . . . . . . . . . . . . . . . . . . . . . 190
Creating a sites Subdirectory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Using Site-Specific Modules and Themes. . . . . . . . . . . . . . . . . . . . . 193
Sharing a Database Among Multiple Sites . . . . . . . . . . . . . . . . . . . . 194
Sharing Tables Across Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
Making Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Making Database Backups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Making File System Backups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Moving Your Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Maintaining a Test Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Creating the test_site Subdirectory . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Creating a Copy of the Site Database. . . . . . . . . . . . . . . . . . . . . . . . . 205
Copying the Files to the test_site directory. . . . . . . . . . . . . . . . . . . . 205
Updating the Test Site’s Configuration Settings . . . . . . . . . . . . . . . . 205
Accessing the Test Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Updating Drupal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Tracking Your Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Testing the Update. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
Performing the Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

Obtaining phpBB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Preparing Your Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Running the Install Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Troubleshooting Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Performing Post-Installation Chores. . . . . . . . . . . . . . . . . . . . . . . . . . 238
Configuring phpBB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
Using the phpBB Administration Panel. . . . . . . . . . . . . . . . . . . . . . . . 241
Configuring Basic Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Creating Your Forums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
Touring the phpBB 3.0 Installer and Administration Panel . . . . . . . . . . . . 252
Installing phpBB 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Configuring phpBB 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
■CHAPTER 9 Touring phpBB’s Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Reading and Posting to Forums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Using the Forum Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Marking Forums As Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Watching Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Formatting Posts Using BBCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Working with Emoticons (Smilies). . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Making Topics Sticky and Posting Announcements. . . . . . . . . . . . . 270
Attaching Polls to Topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Editing Posts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
■CONTENTSxiv
5629_FM_final.qxd 11/16/05 4:11 PM Page xiv
Creating User Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Entering Registration Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Adding Profile Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Setting User Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Choosing Avatar Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

Mastering phpBB Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Using Advanced Forum Permissions. . . . . . . . . . . . . . . . . . . . . . . . . . 303
Setting Per-User Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Using Permissions with User Groups . . . . . . . . . . . . . . . . . . . . . . . . . 306
■CONTENTS
xv
5629_FM_final.qxd 11/16/05 4:11 PM Page xv
Managing Registrations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Validating New User Accounts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Enabling Visual Confirmation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Disallowing Usernames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Managing Your Ban Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Moderating Your Forums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Moderating Individual Posts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Performing Mass Moderation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Using the IP Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Maintaining and Performance Tuning phpBB . . . . . . . . . . . . . . . . . . . . . . . 314
Pruning Dead Posts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
Managing Your Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Using Template Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Introducing phpBB 3.0 Security and Maintenance Enhancements. . . . . 320
Managing Permissions in phpBB 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . 320
Using Strengthened Security Features in phpBB 3.0. . . . . . . . . . . . 320
Performance Tuning in phpBB 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Pruning in phpBB 3.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
Backing Up and Restoring Databases in phpBB 3.0 . . . . . . . . . . . . 324
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
■CHAPTER 11 Modifying phpBB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Installing Modifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
Getting Ready to Install a Hack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

Types of Blogging Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Publishing Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Blogging-Related Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Why WordPress? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
WordPress Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
WordPress Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
■CHAPTER 14 Installing and Configuring WordPress. . . . . . . . . . . . . . . . . . . . 379
Installing WordPress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Meeting the Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Obtaining WordPress. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Obtaining Helper Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Preparing Your Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Running the Install Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
Logging In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
Introducing the Dashboard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Changing the Admin Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Configuring WordPress. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Setting General Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Configuring Discussion Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Avoiding Comment Spam. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
Setting File Upload Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Making Your First Post . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
■CONTENTS
xvii
5629_FM_final.qxd 11/16/05 4:11 PM Page xvii
■CHAPTER 15 Starting to Blog and Building Your Community . . . . . . . . . . 401
Using Basic Post Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Marking Up Your Post with Quicktags. . . . . . . . . . . . . . . . . . . . . . . . . 401
Categorizing Posts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403

Generating Search-Engine-Friendly Permalinks. . . . . . . . . . . . . . . . 429
Contributing to Your Site’s Search Engine Ranking . . . . . . . . . . . . . 430
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
■CONTENTSxviii
5629_FM_final.qxd 11/16/05 4:11 PM Page xviii
■CHAPTER 16 Changing the Look of Your Blog . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Using Themes to Communicate with Your Audience . . . . . . . . . . . . . . . . . 433
Selecting an Installed Theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
Adding New WordPress Themes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Finding Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
Installing Themes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Modifying an Existing Theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Examining a Theme’s Components. . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Installing and Copying the Theme. . . . . . . . . . . . . . . . . . . . . . . . . . . . 441
Modifying Theme Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
Changing the Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444
Adding the RSS Feed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
Adjusting the Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447
Adding Registration and Login Links . . . . . . . . . . . . . . . . . . . . . . . . . 448
Adding a Recent Comments Plug-In. . . . . . . . . . . . . . . . . . . . . . . . . . 450
Cleaning Up the Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
■CHAPTER 17 Customizing Your Blog’s Layout . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Considering What Your Reader Is Doing. . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Having a Conversation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461
Discussing the News. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Coming to Learn. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Looking for a Review. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Moving to the Next Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462
Changing the Layout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463

About the Authors
■ROBERT T. DOUGLASS is a core developer and member of the security team
for the Drupal project. As a leading voice in the Drupal community, he works
hard to introduce new programmers and webmasters to the joys of building
web sites with Drupal. To this end, Robert headed Drupal’s involvement in
the Google Summer of Code, 2005. Robert is a freelance Drupal consultant
and programmer, working out of his home in Germany.
■MIKE LITTLE is one of the founders of the WordPress project and is still an occasional
contributing developer. He wrote his first computer program over 26 years ago. He has been
programming professionally for more than 15 years in a variety of languages, including PHP,
Java, JSP, Perl, C, and assembler. He first encountered the Web in 1993 and has been fiddling
with it ever since.
When he is not tapping away at a keyboard, he likes to read—mostly science fiction, fan-
tasy, biographies, and the odd technical book. He listens to music as much as possible.
■JARED W. SMITH started his foray into message board communities at the
increasingly less tender age of 15, when he first participated in various mes-
sage boards on the Web. He particularly was amazed at the layout of the
Ultimate Bulletin Board (UBB), Infopop’s groundbreaking community solu-
tion, and he decided he must give a UBB-based community a shot on his
own site. Of course, most 15-year-olds don’t have $160 to shell out at a whim.
It was at this time that Jared stumbled over phpBB 1.0.0, which, sure enough, was a free mes-
sage board solution that looked—gasp!—just like UBB!
Immediately, Jared became intrigued with the product. The easy installation amazed him,
and he loved the speed. There was a problem though: the first editions of the board weren’t that
great looking. The borders were too thick on the edges, the fonts were too small, no CSS was used,
and so on, but no matter. He dove into the code and totally reworked the design for his now-
defunct Windows support site, WindowsLaunchpad.com. Jared learned a lot from that experience
and proceeded to begin writing and releasing modifications such as the Anchor Hack, which
returned users to the last post in a thread after they posted, and an enhanced version of another
Who’s Online hack, which he optimized for performance and redesigned to present the informa-

made several core contributions over the past three years. He also maintains nine contributed
modules and advises on the security team. When not promoting Drupal world domination, he
enjoys spending time with his wife and two children.
xxiii
5629_FM_final.qxd 11/16/05 4:11 PM Page xxiii
5629_FM_final.qxd 11/16/05 4:11 PM Page xxiv


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status