Thursday, October 16th, 2008 | Author: Brian Stevenson

Part 1 of an 11-part review of Ric Shreve’s Drupal 6 Themes.

Drupal 6 Themes - The Elements of a Drupal Theme

Garland ScreenshotIf I were to describe chapter 1 with one word I would say “Out-of-order”. Ok, that’s technically 3 words, but the point I’m trying to make is that it was a weak introduction to this book. “Brian, how would you have improved this chapter?” I’m glad you asked. :-P

Let me start by saying there was a lack of an introduction. Granted, there was a preface, but it was the standard boilerplate preface that you find in the beginning of every Packt book. Without an adequate introduction, it feels like one is jumping head first into an ice-cold swimming pool without first dipping a toe to get used to the temperature! I think it would have been a good idea to encourage the reader first and then take a few pages to introduce some of the basics of the Drupal CMS. This would ensure that everyone, even those new to Drupal, will establish a solid reference point.

To make things worse, the first few pages of chapter one jump immediately into some theming concepts as if I had prior knowledge of Drupal theming! Then, somewhere in the middle of the chapter, he decides to define the basic terminology with sections such as, “What is a Theme?” Perhaps this chapter got mangled in the editing process, who knows.

If I were to strictly rearrange the existing sections, and not rewrite any of the content, I would put them in this order:

  1. What Is a Theme? (p. 12)
  2. The Range and Flexibility of Drupal Themes (p. 13)
  3. What you see on the Screen (p. 15)
  4. The Big Picture: How Drupal Displays a Page (p. 18 )
  5. The Importance of Themes in Drupal (p. 7)
  6. Theme It in Whole or in Part (p. 8 )
  7. Build with Blocks (p. 10)
  8. Intercept and Override (p. 11)
  9. The Default Themes of the Drupal Distro (p. 20)
  10. What Is a Theme Engine? (p. 13)
  11. The Theme Files (p. 24)
  12. The Files of a PHPTemplate Theme (p. 26)
  13. The Files of a Pure PHP Theme (p. 28)
  14. Summary (p. 29)

OK, now that I’ve got THAT off my chest, let me get into the things that I liked about chapter one:

  1. 1. He does a good job defining terms.
  2. 2. I like how Ric imparts his wisdom and experience in the form of best practices.
  3. 3. His screenshots and illustrations are easy to understand.

In my own words, here are some best practices or nuggets of information that I can really appreciate from this chapter:

  1. 1. Customize your themes at the highest possible level through intercepting and overriding. Do not alter the core!
  2. 2. Unless you have a really good reason for not using the default PHPTemplate theme engine, you’re better off using the default.
  3. 3. It is possible to design a theme so entire regions will collapse from sight if no blocks are inserted.
  4. 4. Unless you have a really good reason for designing a table-based theme, you will be better off using CSS for all of your region positions because you gain a tremendous amount of flexibility.
  5. 5. You should put your themes in the /sites/all/themes directory to ensure that they are not in the same directory as other core files.
  6. 6. It is a good idea to create a screenshot.png for any custom built themes to help a site administrator preview your theme.

Chapter 1 Grade Card:

Content Usefulness: A-
Content Organization: D+
Spelling & Grammar: A+
Hands-on Practice: N/A
Code Examples: N/A
Overall: B

Next up, Theme Setup and Configuration.

Wednesday, October 08th, 2008 | Author: Brian Stevenson

Drupal 6 Themes, by Ric ShrevesYesterday, I received the long awaited Drupal 6 Themes by Ric Shreves in the mail. I started reading the book and then it dawned on me that it would be a good idea for me to summarize each chapter on my blog so it will help me synthesize my findings before I write a final book review. I’m going to call this exercise WAR (Write As I Read). I am paying homage to Packt Publishing’s “RAW” concept (Read As We Write).

I am going to treat this blog post as a table of contents, so I will update this page with a hyperlink for each chapter that I review:

Chapter 1: The Elements of a Drupal Theme

Chapter 2: Theme set Up & Configuration

Chapter 3: Working With Theme Engines

Chapter 4: Identifying Templates, Style Sheets and Themable Functions

Chapter 5: Intercepts & Overrides

Chapter 6: Modifying an Existing Theme

Chapter 7: Building a New Theme

Chapter 8: Dynamic Theming

Chapter 9: Dealing with Forms

Appendix A: A Guide to Drupal Style Sheets

Appendix B: The Themers’ Toolkit

Saturday, September 27th, 2008 | Author: Brian Stevenson

Drupal 6 Themes, by Ric ShrevesI am just blown away by how many Drupal 6 books have hit the market this year. Four books have already hit the market this year, four more are on the way, and at least four more are due in early 2009. Keep ‘em coming!

As a Drupal enthusiast and evangelist, I get excited when I see the community produce books about Drupal. For me, when I see books published about a particular technology, it’s like a rite of passage. Drupal 6’s roots are now deep enough that many people view it as a platform they can depend on.

I was recently swept into the Drupal community earlier this year, just months after Drupal 6 was released. I cannot begin to express how hard it was to find good resources and tutorials that could help a newbie. In some ways, learning Drupal 6 has been like learning a new language. One of the areas in Drupal 6 that has been a challenge for me is the theme engine.

I considered buying Ric Shreves, Drupal 5 Themes, by Packt Publishing. However, I decided against it because I had no clue if this would help me with the Drupal 6 theme engine. As a compromise, I ended up buying Building Powerful and Robust Websites with Drupal 6 by David Mercer. Just so you know, this is a great book… BUT, it only devoted ~30 pages to the theme engine! Hey, it was enough to get me going, but it obviously wasn’t a thorough treatment of how I can leverage the theme engine in Drupal 6.

But, I just received exciting news! Packt Publishing is releasing Drupal 6 Themes, by Ric Shreves. This book is an updated and expanded edition Ric’s previous book. I’ve pre-ordered my copy and I am looking forward to its arrival!

Wednesday, September 17th, 2008 | Author: Brian Stevenson

Drupal for Education and E-Learning Yesterday I heard about the recently announced Drupal for Education and E-Learning! Over the past couple of months, I’ve been designing courses for Drupal platform and this book gets me very excited about how to effectively use the Drupal platform to educate others in how to use Drupal.

I’ve read a few books published by Packt Publishing and they’ve all been high quality resources. This book is expected in October 2008!

Category: Drupal, PHP  | One Comment