Archive for the Category » Drupal «

Saturday, March 21st, 2009 | Author: Brian Stevenson

activitystream drupal brian stevensonAbout 6 days ago I posted screencast called “Installing & Configuring the Activity Stream Module for Drupal 6.x” to my main web site. I forgot to write a quick blog about it. :-\

I’ve gotten some good input about it; so if you’re into Drupal, check it out!

I’m working on my next screencast right now and I hope to have something posted by 3/23!

Thursday, December 04th, 2008 | Author: Brian Stevenson

Part 2 of an 11-part review of Drupal 6 Themes. by Ric Shreves

fat ass butt chair
If I were to describe chapter 2 with one phrase I would say, “Too much!” As I was reading it, I realized that it would have been better written as two chapters, not one. Using the table of contents, I counted the average number of pages in each chapter; the average chapter is 15-25 long. Chapter 2 is 39 pages long, which is 15-24 pages longer than the average chapter. You might be thinking to yourself, “Gosh Brian, why are you being so fussy?” Let me tell you why.

Chapter 2 completely ended my moment and enthusiasm for completing this book. I had set a goal to read this book at a pace of one chapter per day. Pretty reasonable, don’t you think? Well, I wasn’t able to finish Chapter 2 in one sitting, or two sittings… rather it took me three sittings over three days to finish it! In general, I prefer books that have a regular rhythm. And, when it comes to educational books, I prefer the information in small chunks, not large ones.

I’ll get off my soapbox now.

Here is an outline of Chapter 2:

Finding Additional Themes (p. 31)
Installing and Additional Theme (p. 35)
Configuring a Theme (p. 40)
  - Theme-Specific Configuration Options (p. 40)
  - Color Picker (p. 42)
  - Enable/Disable Page Elements (p. 43)
  - Logo Settings (p. 44)
  - Shortcut Icon Settings (p. 45)
  - Global Configuration Settings (p. 45)
Managing Modules and Blocks (p. 47)
  - The Module Manager (p. 47)
  - The Blocks Manager (p. 49)
    - Configuring Individual Blocks (p. 51)
      - Block Title (p. 52)
      - User Specific Visibility Settings (p. 53)
      - Role Specific Visibility Settings (p. 53)
      - Page Specific Visibility Settings (p. 53)
    - Adding PHP to Blocks (p. 54)
Theming in Action: Dressing up Garland (p. 56)
  - Set the Color Scheme (p. 58)
  - Set Page Elements (Toggle Display Settings) (p. 58)
  - Upload Logo (p. 59)
  - Global Site Information (p. 60)
  - Enable Modules (p. 61)
  - Manage Blocks (p. 62)
  - Add Some Dummy Content and Links (p. 64)
  - Set Access Levels (p. 65)
  - Create a Custom Block (p. 65)
  - Set Block Visibility (p. 67)
Uninstalling Themes (p. 68)
Summary (p. 68)

On Page 47, there was a rather unnatural shift from talking about themes to talking about modules. Considering the first half of the chapter was able theme configuration, they probably could have done a better segue to modules and blocks. Or, better yet, group that portion (pg. 47-55) with the latter half of the chapter that talked about modules and blocks (pg. 61, 62, 65).

The chapter did a poor job with explaining how to do some the exercises. It was like certain portions of the chapter were an afterthought and written in a completely different frame of mind. It made overly-optimistic assumptions about the reader’s level of understanding. This was apparent on pages 64 and 65 with the “Add Some Dummy Content and Links” and the “Create a Custom Block” section.

Chapter 2 Grade Card:
Content Usefulness: B+
Content Organization: C-
Spelling & Grammar: B+ (1 spelling mistake)
Hands-on Practice: B+
Code Examples: A+
Overall: B

Next up, Working with Theme Engines.

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

If 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. He does a good job defining terms.
  2. I like how Ric imparts his wisdom and experience in the form of best practices.
  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. Customize your themes at the highest possible level through intercepting and overriding. Do not alter the core!
  2. Unless you have a really good reason for not using the default PHPTemplate theme engine, you’re better off using the default.
  3. It is possible to design a theme so entire regions will collapse from sight if no blocks are inserted.
  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. 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. 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 Setup & 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!