Drupal 5 Themes

Ric Shreves

eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$14.39 save 40%!
Print book: $39.99
$35.99 save 10%!
Print + eBook bundle: $63.98
Includes free access to the book on PacktLib
$39.59 save 38%!
Free Shipping! UK, US, Europe and selected countries in Asia.
This book can also be purchased from:
Overview
Table of Contents
The Author
Reviews
Downloads

 

  • Learn to create new Drupal 5 Themes
  • No experience of Drupal 5 theming required
  • Set up and configure themes
  • Understand Drupal 5's themeable functions

 

Book Details

Language : English
Paperback : 260 pages [ 235mm x 191mm ]
Release Date : December 2007
ISBN : 1847191827
ISBN 13 : 978-1-847191-82-3
Author(s) : Ric Shreves
Topics and Technologies : All Books, Drupal, Open Source


Table of Contents

Preface
Chapter 1: The Elements of a Drupal Theme
Chapter 2: Theme Set Up and Configuration
Chapter 3: Working with Theme Engines
Chapter 4: Style Sheets and Themeable Functions
Chapter 5: Intercepts and Overrides
Chapter 6: Modifying an Existing Theme
Chapter 7: Building a New Theme
Chapter 8: Dealing with Forms
Appendix A
Index
  • Chapter 1: The Elements of a Drupal Theme
    • What is a Theme?
    • What is a Templating Engine?
    • The Range and Flexibility of Drupal Themes
    • What You See on the Screen
    • The Big Picture: How Drupal Displays a Page
    • The Importance of Themes in Drupal
      • Key Concepts
        • Build with Blocks
        • Intercept and Override
    • The Contents of the Drupal Distro
    • The Theme Files
      • The Files of a PHPTemplate Theme
      • The Files of a Pure PHP Theme
    • Summary
  • Chapter 2: Theme Set Up and Configuration
    • Finding Additional Themes
    • Installing an Additional Theme
    • Configuring a Theme
      • Theme-Specific Configuration Options
      • Global Configuration Settings
    • Managing Modules and Blocks
      • The Module Manager
      • The Blocks Manager
      • Adding PHP to Blocks
    • Theming in Action: Dressing Up Garland
      • Set the Color Scheme
      • Change Display Settings
      • Upload Logo
      • Global Configuration
      • Enable Modules
      • Manage Blocks
      • Add Some Dummy Content and Links
      • Set Access Levels
      • Create a Custom Block
      • Set Block Visibility
    • Uninstalling Themes
    • Summary
  • Chapter 3: Working with Theme Engines
    • What is PHPTemplate?
    • How does it Work?
    • Getting Started with PHPTemplate
      • A Look at the Theme Engine Files
      • A Look at the Key PHPTemplate File Contained in the Theme
      • Two Contrasting Examples
        • A Basic PHPTemplate Theme—Gagarin
        • A More Complex PHPTemplate Theme—Garland
    • Alternative Theme Engines
      • PHPTAL
      • Smarty
      • PHP XTemplate
    • Installing Additional Theme engines
    • Summary
  • Chapter 4: Style Sheets and Themeable Functions
    • A Guide to Drupal Style Sheets
    • Identifying Themeable Functions
    • A Guide to Themeable Functions
      • Aggregator Module Functions
      • Block Module Functions
      • Book Module Functions
      • Color Module Functions
      • Comment Module Functions
      • Drupal Module Functions
      • Filter Module Functions
      • Form Functions
      • Forum Module Functions
      • Locale Functions
      • Menu Functions
      • Node Module Functions
      • Pagination Functions
      • Poll Module Functions
      • Profile Module Functions
      • Search Module Functions
      • System Module Functions
      • Taxonomy Module Functions
      • Theme Functions
      • Upload Module Functions
      • User Module Functions
      • Watchdog Module Functions
    • Summary
  • Chapter 5: Intercepts and Overrides
    • Overriding the Default CSS
      • CSS Overrides in Action
    • Overriding Functions
      • Where to Place Overrides
      • How to Name Your Overrides
      • Overrides in Action: How Garland Works
        • Intercepting PHPTemplate Files
        • Overriding Themeable Functions in Garland
      • Various Approaches to Overrides
        • Intercepting and Substituting Files
        • Placing Overrides in the Theme's template.php File
        • Modifying the PHPTemplate Engine Files
        • Placing Overrides in Dedicated Files
    • Intercepting Template Files
    • Summary
  • Chapter 6: Modifying an Existing Theme
    • Setting Up the Workspace
    • Planning the Modifications
    • Cloning a Theme
    • First Look at Zen/Tao
      • CSS in Zen/Tao
      • Themeable Functions in Zen/Tao
    • Turning Zen into Tao
      • Configuring the Theme
        • Set Global and Theme Configuration Options
        • Enable Modules
        • Set User Access
        • Create Dummy Content
        • Set Up Menus
        • Add New Regions
        • Enable and Configure Blocks
        • Position Blocks
      • Adapting the CSS
        • Setting the Page Dimensions
        • Formatting the New Regions
        • Fonts and Colors
        • Formatting the Sidebars and Footer
        • Formatting the Menus
        • Formatting the Search Box
        • Formatting the Comments Form and Output
      • Adapting the Themeable Functions
        • Modifying template.php
        • Creating a New Template File
      • Before and After
    • Summary
  • Chapter 7: Building a New Theme
    • Planning the Build
    • Build a New PHPTemplate Theme
      • Building a page.tpl.php File
        • Insert DocType and Head
        • Insert Body Tags
        • Lay Out the Page Divisions
        • Place the Functional Elements
        • The Final page.tpl.php File
      • The style.css File
      • A Look at Our New Theme
    • Extending Your PHPTemplate Theme
      • Working with Template Variables
        • Variables Available in block.tpl.php
        • Variables Available in box.tpl.php
        • Variables Available in comment.tpl.php
        • Variables Available in node.tpl.php
        • Variables Available in page.tpl.php
        • Intercepting and Overriding Variables
        • Making New Variables Available
      • Dynamic Theming
        • Using Multiple Templates
        • Dynamically Theming Page Elements
        • Creating Dynamic CSS Styling
    • Build a New Pure PHP Theme
      • Required Elements
      • HTML Headers
      • Head of Document
      • Implementing the Features
        • Favicon
        • Logo
        • Site Name
        • Site Slogan
      • Primary and Secondary Links
      • Sidebars
        • Sidebar Left
        • Sidebar Right
      • Main Content Area
        • Title and Breadcrumb Trail
        • Tabs
        • Help
        • Messages
        • Content Region
      • Footer
      • Theme Closure
      • Overriding Functions
    • Summary
  • Chapter 8: Dealing with Forms
    • How Forms Work in Drupal
    • Modifying and Overriding Form Functions
      • Adding HTML via Function Attributes
      • Using form_alter()
      • Overriding Form Functions from template.php
      • Creating Custom Templates for Forms
        • Page Templates
        • Block Templates
        • Templates for Forms Output
    • Common Form Issues
      • Modifying Data Labels and Other Text
        • Using form_alter()
        • Override the Function
        • Create a New Template
        • Add a Node
      • Modifying the Styling of a Form
        • Using form_alter()
        • Override the Function
        • Create a New Template
      • Using Images for Buttons
    • The Default Forms
      • The User Forms
      • The Login Forms
        • The User Registration Form
        • The Request Password Form
        • The Edit User Info Form
      • The Default Contact Form
      • The Search Forms
        • The Theme Search Form
        • The Block Search Form
        • The Page Search Form
        • The Advanced Search Form
        • The Search Results Page
      • The Poll Module Forms
        • The Poll Block Form
      • The Poll Page Form
    • Summary

Ric Shreves

Ric Shreves is a web application development consultant and tech author. Based in Bali, Ric is a partner at water&stone, a digital agency specializing in open source CMS web projects. Ric has been building CMS websites for over 10 years, and during that time has been involved in projects for a number of global brands, including BASF, BearingPoint, Colgate-Palmolive, Tesco Lotus, FPDSavills CBRichard Ellis, Mercy Corps and many others. Ric has published a number of books on open source in general and on open source content management systems in particular. The WordPress 3 Cookbook is his fourth book for Packt.
Sorry, we don't have any reviews for this title yet.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Find your book in our support section to find errata and to download code samples.

What you will learn from this book

This book is the ideal introduction to theming with Drupal 5. If you want to create a striking new look for your Drupal website, this book is for you. Starting from the basics of theme setup and configuration, you will learn about the Drupal theming architecture and the PHPTemplate engine, and then move on to modifying existing themes and building new themes from scratch. Included is a complete guide to the various style sheets and themeable functions in Drupal 5, making this book a valuable resource even to experienced theme developers. It covers:

  • Creating custom templates
  • Basics of theming in pure PHP
  • Modifying an existing PHPTemplate theme— a step-by-step guide
  • Creating a new PHPTemplate theme—a step-by-step guide
  • Working with forms

The main requirements to make use of this book are knowledge of HTML, CSS, and a touch of creativity! Although this book aims to make Drupal theming accessible to designers, theming in Drupal 5 involves writing some PHP code, and a basic knowledge of PHP will be helpful.

Special Offers

PacktLib gives you access to this and 600+ other titles with an annual or monthly subscription.

Annual subscription:

$220.00 per annum

Monthly subscription:

$21.99 per month

Buy 2 eBooks and Get 50% Off +
Buy Drupal 5 Themes with Drupal 6 Theming Cookbook and get 50% off both the eBooks.
 
Just add both the eBooks to your shopping cart and enter d56tc in the 'Enter Promotion Code' field. Click 'Add Promotion Code' and the discount will be applied.
View more Drupal book offers here  |  View Best Selling eBook offers

In Detail

Drupal is an award winning open source Content Management System. 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.

This book is the ideal introduction to theming with Drupal 5. If you want to create a striking new look for your Drupal website, this book is for you. Starting from the basics of theme setup and configuration, you will learn about the Drupal theming architecture and the PHPTemplate engine, and then move on to modifying existing themes and building new themes from scratch. Included is a complete guide to the various style sheets and themeable functions in Drupal 5, making this book a valuable resource even to experienced theme developers. It covers:

  • Finding your way around Drupal 5's theming architecture
  • Locating and identifying the various elements, functions, and styles
  • Working with the PHPTemplate templating engine
  • Intercepting and overriding default templates and styles

The main requirements to make use of this book are knowledge of HTML, CSS, and a touch of creativity! Although this book aims to make Drupal theming accessible to designers, theming in Drupal 5 involves writing some PHP code, and a basic knowledge of PHP will be helpful.

"One of the things we set out to accomplish was to create a resource. We put together a catalog of the system's 20+ stylesheets and we go through all the default themeable functions. The information is organized logically and will make this a resource people can put on their shelf and turn to when needed. Being able to quickly lay your hands on the information concerning the styles and the themeable functions is a real time-saver." - Ric Shreves, author.

Visit the Drupal 5 Themes Free Online Edition to view chapter introductions and a full chapter.


Approach

Who this book is for

Are there no books available that are right for you at the moment? How about signing up to our newsletter to keep up to date?
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Sort A-Z