Internet Cross Logo
Internet Cross your one stop web tutorial website
Your Ad Here

Back to Drupal 5 Themes product information


Back to your previous page

<< Previous

Spotlight customer reviews:

Customer Rating: Average rating of 4/5Average rating of 4/5Average rating of 4/5Average rating of 4/5Average rating of 4/5
Summary: A nice gathering of theming resources
Comment: 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).

Customer Rating: Average rating of 4/5Average rating of 4/5Average rating of 4/5Average rating of 4/5Average rating of 4/5
Summary: Still useful with Drupal 6, provided that...
Comment: 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.

Customer Rating: Average rating of 5/5Average rating of 5/5Average rating of 5/5Average rating of 5/5Average rating of 5/5
Summary: Drupal 5 Themes Fills a Need
Comment: 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.


Customer Rating: Average rating of 4/5Average rating of 4/5Average rating of 4/5Average rating of 4/5Average rating of 4/5
Summary: For anyone who already has some experience with Drupal and wants to build his or her own theme, this book is a must-have.
Comment: 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.

Customer Rating: Average rating of 4/5Average rating of 4/5Average rating of 4/5Average rating of 4/5Average rating of 4/5
Summary: A great place to start
Comment: 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.

 


<< Previous

Showing page 2 of 2
1 | 2 |