Industrial Deals HPC Best Books of the Year Holiday Dress Guide nav_sap_hiltonhonors_launch For a limited time. 3 months for $0.99. Amazon Music Unlimited. New subscribers only. Terms and conditions apply. PCB for Musical Instruments $54.99 for a limited time only Try it first with samples Handmade Gift Shop Book a house cleaner for 2 or more hours on Amazon Snuggle Up with Your Favorite Holiday Movies on Amazon Video Snuggle Up with Your Favorite Holiday Movies on Amazon Video Snuggle Up with Your Favorite Holiday Movies on Amazon Video  Echo Devices starting at $29.99 Save $30 on All-New Fire HD 8. Limited-time offer. $20 off Kindle Paperwhite AutoRip in CDs & Vinyl Shop now HTL17_gno

Customer reviews

4.1 out of 5 stars
14


on February 5, 2008
Aimed at those with a knowledge of HTML and CSS but with no prior experience of programming, Drupal 5 Themes sets out to show you how you can quickly and easily get a drupal site up and running with a highly customised look and feel.

Drupal is highly themeable, with most aspects of the user interface being accessible purely in the theme layer without needing to dip into module development or the CMS' core. The book takes the user through the various theme hooks and introduces the simple PHP code needed to override them, add new `regions' (in which blocks can be displayed), customise existing themes and create your own (almost) from scratch. The primary focus is on the default theme engine, PHPTemplate, but others are referenced and a little time is spent on the options for building your own theme using raw PHP (without the extra layer of a theme engine).

For the most part the content is straightforward, and the reader should quickly get a feel for the naming conventions that drive the PHPTemplate approach. While not much programming knowledge is needed, it would be helpful for the reader to have a basic grasp of PHP and introductory programming constructs such as loops and conditionals. I was also surprised to find recommendations to name functions phptemplate_* within theme-specific template.php files, where they could instead be prefixed with the theme's name rather than `phptemplate'. PHP's not fond of functions that share names within the same context, and it is best to give those functions the most specific name available to you in order to avoid errors.

Given the fact that only HTML and CSS are listed as pre-requisites I was a little surprised that the PHP code wasn't introduced in a more focussed section. Given its simplicity it's to be hoped that anyone intending to spend much time building drupal sites would be able to figure it out, but while time is spent picking apart example code little time is spent actually giving a conceptual introduction or, for that matter, on explaining how to install drupal in the first place. Surprisingly, space was given to explaining how cascades work in CSS, which you would think is a fundamental part of a knowledge of CSS and unnecessary in this context.

This is the second book in a row that Packt has sent me for review where it has seemed that reference material is scattered too freely amongst the tutorial-style chapters. Significant chunks of space are given over to listing off functions, the locations of stylesheets, and so on, which is useful information but breaks up the flow of the book unhelpfully. It's surprising that that content wasn't moved to an appendix or, as with their jQuery books, a separate volume. Sitting in the middle of the book it feels like unnecessary filler (just one or two examples would do, along with a reference to an appendix, other volume, or online source) and the space could helpfully be given to more detailed tutorial material. That coupled with poor print quality and light paper stock (both also an issue with that previous book) gives the book a lightweight feel and reinforce its weaknesses.

This book should get an HTML/CSS developer who's not afraid to dip their toes into some PHP up to speed with customising a drupal site, and its worth considering if you've been mostly building static sites or customising wordpress and need a content management system with a wider range of features. Unfortunately it's still fairly weak structurally, and you may well find yourself needing to combine it with quite a bit of online documentation to properly cover the topics under discussion.

Disclaimer: I was sent a copy of this book for review by the publisher.
0Comment| 15 people found this helpful. Was this review helpful to you? Report abuse
on January 20, 2008
If you are a designer wanting to learn Drupal, this book is for you. It is written by a designer so there are no programming sections full of code. It shows you how you can customize Drupal's HTML and CSS in detail. The book has a good amount of screen shots, charts, and other visual aids that really help the right side of the brain.

The first 2 chapters are great setup chapters, so if you are new to Drupal they help you get started by telling many of the things designers need to know. There were several "ah ha" moments where concepts finally clicked because of the author's descriptions and examples.

This is also a great reference book. It lists all the CSS files and theme functions that come in Drupal core with a short sentence on their content or purpose. There is an appendix that charts out all the Drupal core CSS files giving you a visual lookup of all ID's and classes for each CSS file.

As I am not new to Drupal the organization was a little strange at first. Topics like overriding template files is covered a few times in first half with little detail. But after finishing the book the organization is more clear. The author spends time going over all the areas of Drupal theming to give you a good background then spends a few chapters modding an existing template and creating one from scratch where he goes into more detail.

The last chapter covers Drupal forms which could do with a book of their own almost. But the author covered a lot of good material to get you started.

"Drupal 5 Theming" doesn't cover CCK or Views theming. CCK and Views are contributed modules that almost every Drupal 5 site uses. It also doesn't cover any advanced theming topics. Which makes this book GREAT for the Druapl beginner, GOOD for intermediates, and FAIR for advanced themers.

Also with Drupal 6 almost here, if you are worried this book will be out of date, don't. There are several theming advances in D6 but the background and understanding this book gives you still applies. Plus D5 is here for the foreseeable future so if you are working on a project now, it will make your job a lot easier.
0Comment| 8 people found this helpful. Was this review helpful to you? Report abuse
on March 13, 2008
A first release candidate of Drupal 6 was made available on December 20 of 2007, that is, 2 days prior to the publication of this theming guide, which covers Drupal 5. Drupal 6.1 has since been released, and many of Drupal's most popular add-on modules are now ready for use on production web sites. The author mentioned on his blog that an updated version of his book will be published, but Packt Publishing is not yet listing 'Drupal 6 Themes' among its upcoming publications. Still, I read the book, and worked through its examples on a Drupal 6 install. As a somewhat seasoned Drupal developer, I still found the book helpful. I highly recommend it, provided that as you read along you refer yourself to the concise (and well-put-together) Drupal 6 theming guide available on Drupal.org. Theming has definitely taken a leap forward in D6. For instance, intercepting and overriding theming functions is a lot easier now.

What this book covers:

Chapter 1 ("The Elements of a Drupal Theme") presents the theming terminology used in Drupal, and that hasn't changed in Drupal 6.

Chapter 2 explains how to set up and configure a theme in Drupal through the admin interface. By way of example, we download the theme Gagarin from Drupal.org and install it. We also configure 'Garland', which still is the default theme shipped with Drupal. Surprisingly, I learnt quite a handful of tricks in this chapter. All of it is applicable to Drupal 6; even the neat PHP snippets used for the content & visibility of custom 'blocks' work as is. For fun, I ported the Gagarin theme to Drupal 6 in less than 10 minutes, using a porting guide put together by Wesley Tanaka. Your milage may vary (you may do it faster than I).

Chapter 3 explains how the PHPTemplate 'engine' works. Wordy as it is, the definition of a theming engine remains somewhat ambiguous. You may download this chapter from the publisher's web site. Take note that the default PHPTemplate 'template' files have been moved to their respective core module folder in Drupal 6. For example, you'll find the default page.tpl.php file under /modules/system, and node.tpl.php under modules/node.

Chapter 4 is a reference guide to stylesheets and themable (ie:overridable) functions. Only a brief description (ie: one sentence) is provided for each function. The author gives us a snippet of PHP code that produces a list of the theming functions used on the page, but it's somewhat useless because with it we don't know which function produces what markup. In Drupal 6, a neat & "sexy" add-on module, part of the 'Devel' kit of modules, tells us which function to override (and so much more): by Firebug-style point-and-click, we select the DOM element we wish to theme, and we learn how to do so through a 'tool tip'.

Chapter 5 presents different ways to intercept & override themable functions. In Drupal 6, one of these ways has been simplified, that of "placing overrides in dedicated [template] files" for which no default file exists. One no longer needs to tell the theming engine about the presence of the template file, as we used to inside template.php. In the instance where we want additional variables to become available inside the template, we use the new Drupal 6 function themeEngineName_preprocess_hook.

In Drupal 6, adding stylesheets (besides the default style.css) is as easy as adding a few lines in a new 'info' file for the theme. Same with creating new regions on the page : the theme.info file takes care of that. (For these, one needs not add any PHP code to template.php.)

In chapter 6, we modify a theme, 'Zen'. Be warned : even the drupal-5 version of this theme has undergone significant change since the publication of the book.

In chapter 7, we learn how to create a theme from scratch -- and so much more (this chapter definitely should have been broken down). We're finally presented with a list of the variables available in each template file. In Drupal 6, many variables have been renamed (for example, $sidebar_left has become... $left), and new handy ones have been created which are available in all templates, for exampe $logged_in and $is_admin. Note that we should use the new D6 variable $body classes to apply dynamic CSS styling, instead of the ol' $layout (still available).

In chapter 8, we learn how to theme forms. I had to do some research to find how to apply the author's solutions within Drupal 6. Some change is trivial, for example the handy hook_ form_alter function has different parameters passed to it in D6, and one only needs to change the function's 'prototype', ie:

From that in D5 : function modName_form_alter($form_id, &$form){

To this in D6 : function modName_form_alter(&$form, $form_state, $form_id){

In D6, some form-theming solutions are easier to implement... or more difficult: I still haven't figured how to use images for the forms submit button. However, imo, a CSS solution is preferred in Drupal 5 _and_ 6.

What this book does not cover, and I wish it did:

- How to use jquery, the wondrous javascript library shipped with Drupal (there is no mention of it, really).

- How to produce a theme with a configurable color scheme, using the Color Module. A simple tutorial where we create a theme for which we can change the color of the header and/or links through the 'setttings' UI would have been awesome.

- Related to the last point, we're not shown how to modify the theme's settings page - to add to it.

- How to theme 'Views' pages, and nodes created with the Content Construction Kit (CCK).

- How to commit a theme to Drupal.org CVS (using a freeware utility like TortoiseCVS, for example).

This book is particulary successful at breaking down information into bits and steps. It's extremely well-written, quite technical and in-depth, and provides a handful of screen captures in most places. We can theme it _all_ in Drupal, and the author drives that point home.

Where the book somewhat falls short in its delivery:

- Although the author comes from a 'design background' (so it says in the book's preface), he fails to inspire. The theme created from srcatch is particularly unappealing.

- When it comes to designing Drupal themes, we're faced with basically copying and pasting CSS rules scattered throughout a set of *.txt source files to one stylesheet.

To be fair, this is not a book on CSS, nor web design.
11 comment| 6 people found this helpful. Was this review helpful to you? Report abuse
on February 26, 2008
In Drupal, Theming is so much more then changing some colors. Its all about customising your site. Therefore the subject is so broad that it needs its own book. Ric Shreves wrote the very first, and as far as I know, only book about theming: Drupal 5 Themes. Eventhough several Drupal development books touch the surface of theming, none manage take you from the very basics of Theming, up to the subject of building your own templating engine and customising forms. A well balanced book, for both newcomers to Drupal as well as hardened developers whom want to learn more on designing their site.

It requires great skill to make The Beautiful Photoshopped Designers mock-up into a real Drupal Site. Drupal 5 Themes helps you on your way to do that. It starts off for those without any Drupal experience, by explaining how to download and install Drupal. It even mentions how to build your development server, but if you are entirely new, getting the required webserver with PHP running, other resources, or some help is needed.
Still, even for those without any Drupal experience, the book is of great value. It focuses on the theming part, so if you are new to Drupal and will your entire site with it, you will need resources beyond this book. Resources which, for example, help you decide on how to configure your site, what modules to install, and so forth. Theming is only a part of the whole process to get your very own Drupal site online.

By starting off with a good explanation of all the terms used in Drupal theming, Shreves made this book very helpfull. Even for the skilled PHP, HTML and/or CSS developers, it is very hard to find the way around in Drupal Theming. Without knowing the terms and being able to fit them in the bigger picture, theming remains extremely hard. Drupal 5 Theming does a really good job in uncluttering all that. It explains very clear how the principle of the whole theming in Drupal works. Drupals theming is very flexible, but that comes with the price of complexity. A total of three chapters are devoted to explanation of the whole concept of theming in Drupal. From how the CSS system works, via the idea of Theming engines, to a very clear explanation of the override system that Drupal uses.

On that subject, Shreves made a good choice to not start headfirst with an entirely new design and theme, but he rather take the often followed path of adjusting an existing theme. Drupal comes with many free themes which often meet peoples needs almost. Only minor adjustments might be needed. An entire chapter is devoted to how one can adjust such an existing theme.

Being a designer, Shreves has a good view on the way Designers often look at Drupal. He uses screenshots and diagrams to explain the structure and architecture of Drupals theme layer, but also to explain his choices. One or two screenshots were rather hard to read, though. From my five years of Drupal development experience, he is very right when he not only uses technically perfect solutions, but rather touches all possible solutions with explanation of their pros and con's.
Still, it feels not right that he puts forward the solution of modifying the basis of Drupal (often referred to as "Core"). Eventhough he warns the reader that that route is dangerous, I would have preferred to see that as the one option that should never be followed. As will anyone within Drupal tell you it is. Besides this, I found nothing incorrect or wrongly phrased items.

The author clearly read the technical documentation as well as the code very well. He included parts of that documentation, as reference, but in such a matter that it is nearly useless: Including functions and their explanation is nice, but only if the parameters passed to- and variables passed from-, these functions are explained as well. As it is now, one still needs the online documentation anyway.

Furthermore, I missed a very important part in theming: Search Engine Optimalisation (SEO). In Drupal, or any website, you can achieve a lot of SEO by creating properly formed, accessible XHTML. By skipping this subject entirely, the book leaves a very important part of theming untouched.

For the more experienced developers, the book has a chapter on how to build a theme from scratch: start with nothing and make that into your own theme and site. For larger, or more demanding sites that is often the way one needs to go, so it is a very valuable subject. Though, how the author thinks I will copy three pages of source-code from the book, is beyond me. Besides two of such way too large code samples, the included samples are very well chosen and well explained. Also, Shreves did a good job on finding the most useful online Drupal handbook pages, for more in-depth reading on the subjects he explains.

Last, the really difficult subject of overriding forms is touched. It is often said that this is the hardest part in Drupal. Even so, the author manages to explain this matter in clear, understandable language, which makes this book very valuable even for skilled themers.

For anyone who already has some experience with Drupal and wants to build his or her own theme, this book is a must-have. For those new to Drupal, it is really helpful to get going and get a cutomised Drupal site online. By covering all aspects of Theming, Drupal 5 Themes makes very complete reference for Drupal developers.
0Comment| 3 people found this helpful. Was this review helpful to you? Report abuse
on January 18, 2008
My first reaction to this book was fairly negative after looking though the table of contents. The book doesn't cover CCK or Views theming at all - 2 essential parts of almost any current Drupal site. I was hoping it would cover CCK and Views theming in detail. However, when I got over the initial disappointment, I found a lot of good content in the book. It explains how themes work in detail in Drupal 5, how to modify existing themes, find additional themes for Drupal, and making themes from scratch. It even covers theming forms and making your forms use button images (something that is not so straightforward in Drupal).

In the introduction the author, Ric Shreves, explains the books if for web designers and developers approaching Drupal theming for the first time. In this context, the book does a pretty good job. He says the book is not for hard core programmers.

For me personally, I have done some Drupal theming so some of the book is not so interesting. Yet, the book still highlights some areas like theming forms and template overrides that I need to look up when theming new sites.

The verdict? The book is work serious consideration if you are new to Drupal theming. If you are fairly experienced with themes in Drupal, look at the free download chapter and the table of contents to see if you think it offers enough value for you. Free chapter is here: [...]
0Comment| 6 people found this helpful. Was this review helpful to you? Report abuse
on April 15, 2008
One of Drupal's strengths lies in its ability to allow virtually all the user interface to be modified with regards to is presentation without having to touch the core code. In this, undoubtely Drupal is one of the most powerful content managers available. But this strength is, mostly to the newcomer, hidden under seven keys.

After walking between sweats and eurekas the road that leads from the newbie state to the competent-though-not-guru state, you begin to discover that indeed it's not rocket science and that the system really is as flexible as you need or want. But this is a road not easy for anybody; there's a steep learning curve not anyone will follow to the end. The best proof of this are the questions many users ask in the forums, questions that reveal little patience for Drupal's complexities.

Ric Shreves' book, Drupal 5 Themes, is a welcome first step towards a basic organization of all content about themes. In eight chapters the author describes the basics of how Drupal handles its HTML output. If someone is beginning the road to theme building, the book makes it an easier journey, and it handles its content well. These are its chapters:

* 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 and existing theme
* Chapter 7 - Building a new theme
* Chapter 8 - Dealing with forms

The part I consider better finished is the explanation of the basics of Drupal's output control, that is, the principle of interception and overriding. I guess I'd need a bit more detail about the way suggestions work, and I seem to recall from a Lullabot workshop that it's something related with how Drupal parses an URL, because in the end all orders you give Drupal come through an URL or as a variable within a form.

I believe the book stands at a basic level. It won't help you build a theme you might use in a realistic context (the one it builds is rather modest and simple). It doesn't cover real life issues, such as how to take advantage of the jQuery library, how to add/configure dropdown menus, how to use tabs or how to theme CCK/Views, probably the most powerful module combination in the Drupal universe. Rather descriptive of the fundamental principles, the book serves well the explicit function of gathering in a single place resources otherwise disperse.

It is here where the book falls short. At the risk of sounding too crabby, the material is rather fragmented using section titles, and theoretically that separation should be visible in the table of contents (pages i-vi). Not at all: for some chapters, the TOC includes the titles down to the third level, while for some it stays at the second. In other words, the book's body includes sections not visible in the TOC. An example: the section "You can theme it all" on page 13 doesn't exist in the TOC. And this happens often.

On the other hand, it's actually quite hard to figure out the hierarchical position of a section or subsection. This has to do with Packt's editorial styles, but I think it would be more clear and more useful to follow a name convention based in numbers, 1.2.3.4 for instance, instead of using just titles.

Chapter 4 includes an inventory of themeable functions (that is, functions whose ouptput can be controlled applying the intercept/override principle). You'd expect the inventory to be exhaustive, that is, to include all themeable functions. It's not. The list doesn't include the functions theme_submit, theme_menu_local_tasks, theme_status_report and theme_get_settings.

Ah, well. The errata list in Packt's website reveals a fair amount of slight but annoying typos (for instance, values switched over in tables).
0Comment| 2 people found this helpful. Was this review helpful to you? Report abuse
on April 26, 2008
The first thing new Drupal developers ask me is, "How do I make my new Drupal site look different from the rest?" Drupal 5 Themes by Ric Shreves is the first book dedicated entirely to theming Drupal. This topic certainly deserves its own book and I'm glad we now have it. (On the down side Drupal 6 is already released and Drupal 7 is in the works.)

Somehow I've been able to avoid advanced theming by using sub-contractors or taking themes from the Drupal Theme Garden. But I realize that designers and programmers cannot go it alone. In order to build the most interactive sites, we need to reach across the gap and learn a bit about each other's craft. Enter Drupal 5 Themes.

The book is written for designers who need to learn some base level Drupal theming. It covers Drupal's use of the abstraction layer in a way that is easy to understand. And while the pace and brevity are appropriate for the non-programmer, be prepared to look at some code: Chapter 8 does a good job of exposing novices to the template.php file and the form_alter api, allowing them to take advantage of some of Drupal's more advanced modification options.

As a programmer, my favorite section was Chapter 4 - A guide to Themeable Functions (p.87)--it makes an excellent quick reference guide by listing theme functions and their definitions, organized by module. I find these sorts of things super useful, relieving the poor souls who answer my endless questions in the Drupal-support IRC channel about "What is the right theme function to use?"

But this list, as well as the book in general, is limited as it only addresses theme functions in the Drupal core. Most sites I've developed have 20+ modules loaded, in addition to the Drupal core. It would be great to have additional references for popular modules and their theme functions. For instance, the Content Construction Kit and Views modules are becoming the preferred way of building forms, detail pages, and lists, therefore deserve addressing.

I recommend this book to designers who need to learn some Drupal, as well as to new Drupal programmers who are looking to get a handle on Drupal's abstracted theme layer. But the established Drupal programmer, like myself, will find it a little too brief and lacking in real world use cases, considering Drupal's modular capabilities.
0Comment| 2 people found this helpful. Was this review helpful to you? Report abuse
on April 23, 2008
A few months back, I was sent a review copy of Drupal 5 Themes by Ric Shreves from Packt Publishing. I have been thumbing through it since, and despite some odd editing I have found it to be very easy to read. The examples strongly illustrate concepts through out.

I really enjoyed the first couple of chapters which reinforced concepts that I already grasped providing very basic Drupal management and configuration and discussing what makes a Drupal theme. It goes on to illustrate setup and configuration. Chapter 3 looks at Theme engines--in depth for PHPTemplate and then touches on other engines. Chapter 4 explores style sheets. Chapter 5 looks at intercepts and overrides. Chapter 6 covers modifying existing themes using Zen primarily as the example theme. Chapter 7 explains the process to create a new theme from scratch. Finally Chapter 8 covers forms. Each chapter has a concise summary that re-iterates what was learned in during the chapter.

I appreciated that some effort was put into explaining how cascading operates in CSS--a touch that will definitely help folks who are new to the sphere and made following parts of the book much more accessible.
There is a form to download a copy of the sample files in the book. When you put in your request, an automatic email will be sent to you--be patient, it will take a few minutes for it to get to you. The email will contain a link to a ZIP file containing the files.

Interestingly, there wasn't any information on two tools that I was taught back in the days of 4.x--CCK and Views. This seems to me to be an oversight given the prevalence of sites using CCK and Views.\

This book is terrific for a beginner who is getting his or her feet wet in Drupal theming. It makes for a strong reference for themers with more experience as well. I've got to say, that it has inspired me to dig deeper into the theme layer of Drupal and has provided me with insight that helps me to understand what our themers at work are engaged in.
All in all, I enjoyed the read and can recommend it.
0Comment|Was this review helpful to you? Report abuse
on February 28, 2008
I'm extremely impressed with Drupal 5 Themes. I received this book just after finishing coding three custom themes for clients - so Drupal themeing was definitely on my brain! The book is written for non-technical designers, not programmers. However, experienced programmers could find real value in this book - particularly if the programmers are new to Drupal. This book has some of the clearest, easiest to understand explanations of Drupal. If you spent much time reading the Drupal documentation, you will really appreciate the author's writing style. I'll be teaching Drupal soon, and I'm considering using this book as part of the course.

I like the structure of the book. After providing an excellent overview of Drupal, the first major exercise is modifying an existing Drupal theme. That is how most people start off learning how to theme anyway, but with this guide they should have a much better idea of what they are doing than most beginning theme designers. The second major assignment is for the programmer to design a theme from scratch. After completing both of these assignments, the reader should have tremendous confidence that they will be able to design a theme.

I wish the author had written about CCK and views moduales. They are important to many sites, and his writing style would have been a welcome addition to the documentation.
0Comment| 2 people found this helpful. Was this review helpful to you? Report abuse
on February 19, 2008
As a front-end designer, making sense of the seemingly baroque method of Drupal theming was beginning to look like a hopeless task. I had done some previous research but I kept being met with vague answers like, "well, in Drupal you could do it that way, however, you could also do it like this or this or this..."

So when I started reading "Drupal 5 Themes," I was relieved to finally see Drupal theming presented in a way that I (a non-programmer) could grasp. Although at times tedious or redundant, the step by step approach to modifying and then creating a new theme finally started turning on the lightbulbs for me. Shreve's approach instilled proper principles without becoming preachy, such as "don't edit core" and how to handle naming conventions.

I found chapter four's list of theme functions and chapter seven's list of theme variables to be an especially handy reference.

There were of course a few parts of this book that could have been more clear. The chapter on forms provides too many solutions without enough explanation of the overall forms system. The method of intercepting and creating variables could have been explained more thoroughly as well.

Overall, reading this book demystified Drupal theming and got me excited about jumping in and making my own themes.
0Comment|Was this review helpful to you? Report abuse

Need customer service? Click here