Table of Contents

Drupal handbook 1

General information about Drupal 12

4.6 roadmap 15

Aims 18

Use Cases and Target Users 18

Principles 18

Case studies 20

Success stories 21

contaire.com - A Corporate Website Based On Drupal 21

Why Linux Journal converted to Drupal and how it went 25

Community: structure and roles 28

The Drupal Core 28

Contributions 28

Documentation and Support 29

Users 29

Download Drupal, modules, themes and translations 29

Druplicon (the logo) 29

Feature overview 30

Hosting and services 30

OpenSourceHost 31

CascadeHosting 31

GrafiX Internet B.V 31

Norrix 32

Moshe Weitzman 32

Teledynamics Communications 35

webschuur.com 35

Steven Wittens 35

Gerhard Killesreiter 36

Trae McCombs and Kyle Smith 36

Heydon Consulting - Gordon Heydon 37

Matt Westgate 37

2bits.com 38

Presentations and articles 38

Rolling your own system vs using Drupal 39

Sites that use Drupal 42

Where does the name 'Drupal' come from? 42

Donating to the Drupal project 43

User's guide 47

Basic concepts 47

Registering and logging in 48

Changing your account settings 49

Account Settings 49

Additional Information 50

Creating new content 50

Creating comments 51

Adding "nodes" (stories, forum topics, etc.) 52

Creating a story 53

Alternative ways to enter content 55

Posting and editing content with w.bloggar 56

Editing and deleting content 56

Administrator's guide 57

Drupal terminology 57

General terms 57

Node types 59

Installation 60

System requirements 60

Installing new modules 61

Installation process 63

General Instructions 69

How to install Drupal for newbies using Windows, FTP and phpMyAdmin 70

Upload the database 71

Get Drupal ready 71

Change "/tmp" on your drupal site 72

Installing Drupal in a subdirectory 72

Linux specific guidelines 73

Installing PHP, MySQL and Apache under Linux 73

Moving Your Drupal Installation To A New Directory 74

MS SQL Server Guidelines 74

OSX Specific Guidelines 75

PostgreSQL specific guidelines 76

Installing PostgreSQL on Windows 77

Windows specific guidelines 77

Installing Apache (with PHP) on Windows 77

Installing MySQL on Windows 79

Installing PHP4 on Windows 79

Untar 80

Using Clean URLs with IIS 80

Installing Drupal on Windows 82

Installing Drupal on Windows Ext 82

Installing Drupal on Windows Ext 96

Windows XP IIS development test system guidelines 109

Installing new themes 113

Migrating from other weblog software to Drupal 114

Migrating from ezPublish 114

Move ezp database content to drupal database 115

Parse ezxml (in perl, with LWP::UserAgent) 120

Get ezpublish user real names for drupal profile.module 121

Migrating from Geeklog 122

Migrating from LiveJournal 124

Import your LJ through an IFRAME held in a Book Page or similar. 124

Using provided Import Module 125

Use the Livejournal Module to import the raw data into Drupal 125

Migrating from Movable Type 126

Extract Movable Type content as xml 127

Moving your MT styles and templates 127

Template for MT entry and comment export and Drupal import 130

Parse xml into sql insert statements 133

Insert content into drupal nodes 136

Setting terms for inserted nodes 137

Migrating from PHPNuke 137

Migrating themes 137

Migrating users 138

Migrating from PostNuke 138

Configuring mod_rewrite in .htaccess for PN legacy URLs in 138

Search Engine Friendly Migration 139

More than one drupal site on one machine 141

Drupal IDs 142

Multiple directories 142

Multiple domains or vhosts 143

Multiple domains or vhosts using different databases 143

Multiple domains using the same database 144

Tuning your server for optimal Drupal performance 144

Tuning PHP 144

PHP Caches 145

Turck MMCache 145

Configuration 148

Initial configuration 148

Changing Drupal's basic settings 148

See the links below for further guidance 148

Anonymous user 149

Default front page 149

Examples: 150

Clean URLs 150

Error handling and reporting 151

Error pages 151

Error reporting 151

Cache support 152

How Drupal's cache works 152

File system settings 152

Path settings 153

Download method 153

Dealing with error messages 153

Date and time settings 154

Customizing the interface 154

Customizing user login 155

Disable Login Block 155

Congestion control: tuning the auto-throttle 156

Adding syndicated content (newsfeeds, RSS) to your site 163

Database table prefix (and sharing tables across instances) 165

Simple usage 165

Advanced usage 165

Super advanced usage 166

Tables that should not be shared 166

Search engine friendly and robots.txt 167

The tolerant Base URL 169

Warning 169

Blocks 169

Block Visibility 170

Weight 170

Custom Administrator Defined Blocks 171

Note about Block Titles 172

Custom Blocks 172

Show block to certain users only 172

How to show a block only to logged-in users 172

How to show a block only to anonymous users 173

How to show a block only to certain users 173

Debugging the Path 174

Custom login 174

All published content in a list 175

Blog Categories 175

Blogcentric Random Image 176

Comment Approval Count Block 177

Hits by Month 178

Latest stories block 178

Paypal blocks 179

Pull Down Top Level Category Links 180

Random image 182

Random image display 182

Show highest contributers to a site 182

Submission queue block 183

Top users by comment number 183

Uptime and load on Unix systems 184

Drupal modules and features 185

A blog for every Drupal user 185

Configuring User Blogs 185

Making User Blogs More Accessible 186

Additional features 187

Collaborative book or documentation writing 187

Maintaining a FAQ using a collaborative book 188

Printing PHP Variables from GET or POST Forms 189

Comment system 190

User control of comment display 190

Additional comment configurations 190

Notification of new comments 191

Comment moderation 191

Cron system and crontab 193

Cron 193

Directory Server (Drupal Sites) 194

Discussion forums 195

Drupal as a news aggregator 195

What do I need to subscribe to a feed? 196

Configuring news feeds 196

Creating Categories in the Aggregator 197

Tagging Individual Items in the Aggregator 198

Using the News Aggregator 198

RSS feed blocks 199

Extending user information (profiles) 199

Locale or internationalization support 200

How to interface translation works 201

Moderation, collaborative rating 201

Moderation queue 202

Comment rating 202

Polls or enquetes 202

Post content using the Blogger API 203

Putting blocks with content in the sidebars 203

Administrator defined blocks 204

Search configuration 204

Statistics, top nodes and access log 205

Introduction 205

Configuring the statistics module 206

Popular content block 206

Support for static pages 206

Taxonomy (alias sections and categories) 207

Vocabularies and Terms 207

Using Vocabularies: Displaying Nodes by Terms 210

More about Taxonomy 212

Creating a Block with links belonging to certain taxonomy terms... 212

Tracker 213

URL aliasing 214

Background 214

Permissions 215

Mass URL aliasing 215

Watchdog 216

Weblogs.com, technorati.com and blo.gs notification 216

User management system 216

Managing access control with permissions and user roles 217

User authentication 219

User preferences and profiles 219

Using distributed authentication 220

Distributed authentication 220

Upgrading from previous versions 221

Upgrading from Drupal 2.00 to 3.00 221

Upgrading from Drupal 3.00 to 4.00 and later versions 222

Backups 222

Best practices guidelines 223

Backing Up Your Drupal Site 223

Test Sites 224

File / directory management 224

Accounts and roles 225

Troubleshooting FAQ 225

Installation / Configuration 225

"headers already sent" error 225

"LOCK TABLES sequences WRITE" Error 226

"method POST is not allowed for the URL /index.htm" Error 227

.htaccess page forbidden 227

E-Mail from Drupal is Bouncing or not being Sent 227

File permissions 228

Solution 1 (recommended) 228

Solution 2 229

How can I adminstrate my navigation on my drupal site? 229

How do I unset the clean urls? 231

no content on main page for non admin users 232

PHP Safe Mode Issue 232

What is the minimum version of PHP? 233

How can I install modules? 233

Nodes 233

cant create static php page 233

PHP content won't parse 234

Schedule and Expire Nodes 234

Search 234

Search index db empty / incomplete 234

search multibytes language 235

Polls 235

Are polls supported in Drupal? 235

Can a user vote more than once in a poll? 235

Miscellaneous 235

Download offline copy of drupaldocs.org - stuck without net access

How can I change Drupal's character encoding? (UTF-8 and Unicode).

How do I report a bug in Contributed modules 236

Making a custom script work (independently) along with a Drupal setup 236

Move existing site to new server 237

Moving your site to another url 237

My URL is wrong in the list of Drupal Sites 238

truncated fields / unable to login / php 4.2.3 bug 238

How to install a Patch? 239

Contributor's guide 240

Contributing to Drupal 240

Bug reports 242

Feature suggestions 242

Task List 243

The revision process 243

Criteria for evaluating proposed changes 245

Tips for contributing to the core 246

Mailing lists 247

Accessing the Drupal mailing lists using a news server 248

Mailing of project issues 248

Coding standards 248

Drupal Coding Standards 248

Functions and Methods 252

Constants 252

Global Variables 252

Filenames 253

Comments 253

Indenting 253

PHP Code tags 253

SQL naming conventions 254

Functions 255

Constants 255

Control structures 255

Header comment blocks 256

CVS repositories 256

Additional references 257

Drupal CVS repositories 257

Main repository 257

Contributions repository 258

Adding a file to the CVS repository 259

CVS front ends for Windows 259

TortoiseCVS 259

WinCVS 261

CVS on Mac OS X 261

Concepts of CVS 261

Repository 261

Branch 262

Head 262

Working copy / Work area 262

Project 262

Patch 263

Setting up 263

Preparing a project 266

Committing a project 267

CVS 267

Project 267

Promoting a project to be an official release 268

Apply for contributions CVS access 268

Using CVS with branches and tags 268

Tracking Drupal source with CVS 270

An Example 271

Updating the vendor branch 272

Summary 273

Additional Resources 274

Sandbox maintenance rules 274

PHP Debugger 275

APIs and functions (Doxygen) 275

Doxygen Formatting Conventions 276

Creating and sending your patches 278

Diff and patch 280

Diff and patch on Windows 281

diff 281

patch 284

diff and patch 284

Rules of reviewing patches 285

Maintaining a project on drupal.org 286

Creating a project 286

Dowloads and packaging 286

Managing releases 286

Orphaned projects 287

Drupal.org site maintainers 287

Drupal test suite 288

Module developer's guide 289

Introduction to Drupal modules 289

Drupal's page serving mechanism 290

Tips for database compatibility 298

Updating your modules 299

Converting 3.0 modules to 4.0 299

Required changes 299

Converting 4.0 modules to 4.1 300

Required changes 300

Optional changes 301

Converting 4.1 modules to 4.2 301

Converting 4.2 modules to 4.3 303

Creating modules: 4.3.1 309

Converting 4.3 modules to 4.4 327

Converting 4.4 modules to 4.5 335

Check_output() changes 339

Filter hook 340

Filter tips 341

Creating Modules for 4.5.* 342

Converting 4.5 modules to 4.6 358

Block system 358

Search system 359

Module paths 359

Database backend 360

Theme system 360

Watchdog messages 360

Node markers 360

Control over destination page after form processing 361

Confirmation messages 361

Inter module calls 361

Node queries 361

Text output 363

Writing a node module 364

Writing efficient database JOINs 364

Connecting to multiple databases within Drupal 365

Drupal's menu building mechanism 366

Drupal's node building mechanism 370

How Drupal handles access 373

'Status' field values for nodes and comments 374

Writing themable modules 374

Theme developer's guide 375

Theming overview 375

PHPTemplate theme engine 377

Installing PHPTemplate 378

Creating a new PHPTemplate 378

Block.tpl.php 379

Box.tpl.php 380

Comment.tpl.php 380

Node.tpl.php 381

Page.tpl.php 382

Alternative templates for different node types 386

Making additional variables available to your templates 387

Overriding other theme functions 388

A BEFORE and AFTER example of Overriding the User Profile Pages using PHPTemplate 390

Protecting content from non-logged in users when using phptemplate overrides 390

Theme Snippets Repository 392

Custom Login 392

Themeing Flexinode (example) 393

The Quick Version 393

The Long Version 394

Example Files 396

XTemplate theme engine 397

Creating a new XTemplate 398

Template Basics 399

Header Section 400

{search_url} 404

{search_description} 404

{search_button_text} 404

{mission} 404

{tabs} 405

{help} 405

{message} 406

Node Section 406

{submitted} 407

{taxonomy} 408

Comment 408

{submitted} 410

{content} 410

Blocks 411

The Section 411

Footer 412

{footer_message} 412

Editing With Golive 413

Plain PHP themes 414

Suggestions for theme coding style 415

Tips for designing themes in Dreamweaver, GoLive etc 417

Dreamweaver 417

Updating your themes 418

Converting 3.0 themes to 4.0 418

Required changes 418

0 0

Post a comment