Drupal 5 Themes


Drupal 5 Themes
eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$14.39
save 40%!
Print + free eBook + free PacktLib access to the book: $63.98    Print cover: $39.99
$39.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Support
Sample Chapters

 

  • 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 : 9781847191823
Author(s) : Ric Shreves
Topics and Technologies : All Books, CMS and eCommerce, 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 applications consultant and tech author. He’s been building websites since the mid-90s and writing about tech for almost as long. Ric specializes in open source content management systems and has written texts on each of the big three: WordPress, Joomla! and Drupal. Ric is the founding partner of water&stone, a digital agency that focuses on new media and online marketing. He works with clients on digital marketing strategy and supervises the SEO implementation team. Ric lives in Bali and divides his time between the island and Singapore.
Sorry, we don't have any reviews for this title yet.

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.


Errata

- 24 submitted: last submission 10 Jan 2012

Errata type: Typo | Page number: 130

In the section how to set up the menus, the weights for the "Home" and "Contact Us" links are supposedly set to "10" and "-10", respectively. It should be changed to "-10" and "10" respectively, in reference with the screen shot shown on page 148.

 

Errata type: Typo | Page number: 10

In the fourth paragraph there is "administer>site>building>blocks". It should be "Administer | Site | Building | Blocks".

 

Errata type: Typo | Page number: 123

The penultimate paragraph has "double periods". It should be changed to "single period".

 

Errata type: Typo | Page number: 106

The author mentions the Xtal templating engine, while he intends to mention Xtemplate.

 

Errata type: Typo | Page number: 27

In the last paragraph there is "down side". It should be changed to "downside".

 

Errata type: Typo | Page number: 120

In the tips & tricks box there is "Dev Server". It should be changed to "dev server".

 

Errata type: Code Typo | Page number: 86

The PHP code contains four back ticks, which should be replaced with straight apostrophes. 1)second line: print '

  1.  
      '

       

       

  2. ' 2)fourth line: 'user' 3)fifth line: 'theme' 4)eight: '

Errata type: Typo | Page number: 54

Under Set Access Levels heading paragraph there is "sites". It should be changed to "site's".

 

Errata type: Typo | Page number: 69

template.engine should be phptemplate.engine

 

Errata type: Typo | Page number: 12

In the 3rd bullet there is "assemble to core" should instead read "assemble the core"

 

Errata type: Code Typo | Page number: 130

In Navigation footer it is "yourdomain /?q=user". It should be changed to 'yourdomain/?q=user'.

 

Errata type: Typo | Page number: 8

In the paragraph just above the figure there is "new-comer". It should be changed to "newcomer".

 

Errata type: Typo | Page number: 50

Just below the figure there is "FavIcon". It should be "favicon".

 

Errata type: Language | Page number: 15

Spelling error - discreet rather than discrete

 

Errata type: Typo | Page number: 23

In the later part of the page just above the new heading there is "in depth". It should be changed to 'in-depth'.

 

Errata type: Typo | Page number: 22

Just above the figure there is "comprise". It should be changed to "compose."

 

Errata type: Typo | Page number: 188

In the fourth paragraph there is "page-blog-tpl.php". It should be changed to "page-blog.tpl.php".

 

Errata type: Typo | Page number: 87

In the first paragraph there is "some where". It should be "somewhere".

 

Errata type: Typo | Page number: 130

In the section describing how to set up the menus,the weight of the Blog enteries is 10. It should be changed to "-10" in refrence with the screen shot shown on page 148.

 

Errata type: Typo | Page number: 24

In the line just above the summary there is "in depth". It should be changed to "in-depth".

 

Errata type: Technical | Page number: 44

The descriptions for "aggregator" and "aggregator/*" are swapped.

 

Errata type: Language | Page number: 47

In first paragraph under new heading there is "to the tailoring an existing theme." It should be changed to "to tailor an existing theme".

 

Errata type: Language | Page number: 10

In the second paragraph there is "blocks manager". It should be changed to 'Blocks manager'.

 

Errata type: Language | Page number: 10

In the second paragraph there is "where ever". It should be changed to "wherever"

 

Sample chapters

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

Frequently bought together

Drupal 5 Themes +    Getting Started with Oracle Hyperion Planning 11 =
50% Off
the second eBook
Price for both: £27.05

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

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.

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

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
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