Want to get Lullabot article, videocast, and podcast announcements delivered right to your in-box?
Let us know your email address (we won't share it) and we'll let you know when anything exciting happens.
Announcing Our Latest Video: Advanced Theming for Drupal
We're proud to announce the fifth video in the Lullabot Learning Series. Advanced Theming for Drupal, which picks up where the Drupal Theming Basics video lets off.
Here's the description:
The Lullabot Learning Series continues with an in-depth look at the advanced features of Drupal's theming system. In this 2-hour video Nate Haug, Jeff Robbins, and James Walker explain how to completely control the HTML markup Drupal generates. You'll learn how to modify and add variables sent to Drupal's template files and how to use the Theme Developer Tool to simplify the task of working with and navigating Drupal's complex theme system.
The video includes a crash course through PHP, then dives into advanced theming concepts with practical examples such as: how to theme forms, how to cleanly expose information to the theme system, and how to empower your site administrators by making certain parts of the theme available to them for customization. Lastly, the team covers security best practices on shows how to best sanitize user-submitted data and prevent security exploits.
This video completely implements our freely available 960 Robots theme, and gives you the tools you need to make your Drupal site no longer look like a Drupal site.
You can read the full description on store.lullabot.com.
In the following free sample chapter from the video, Nate Haug gives an overview of the template.php file and sets the stage for the specific examples that are provided throughout the course of the video:
The download version of Advanced Theming for Drupal is available right now in our store. You can find out more information and see another sample video that gives an overview of everything that's covered.
Comments on this post will automatically be closed three months from the original post date.



RSS Feed



Comments
Thanks for 960 Robots Theme
I've been having a great time customizing your 960 Robots Theme for my new site photoshopisland.com. It's still a work in progress but I plan on an official launch in a week or so. I should purchase your training video as it may have eliminated some of the hours I've put in customizing. I may still buy it. Are you offering any specials currently? I own your other three videos...any discounts for previous buyers?
Ugh!
Ugh! You should have gotten on our mailing list. We had a bit of a "private sale" over the weekend and sent out a discount coupon to everyone on the list.
I love the 960 Robots theme customization, by the way. Be sure to let us know when the site launches and we'll send out a Twitter message about it.
Real names
Nice work on the videos. (Unfortunately I didn't see that offer before buying a few, as the videos are quite expensive.)
The Advanced Theming video was just what I've been looking for to demystify a few things in Drupal. In fact, the example of changing how the user name displays was exactly a task I needed to complete.
However, I came across a bug I believe. I built a function as you had to change the display of the user name to the real name, but now if I am logged in with that name and try to submit a comment to a blog posting, I get an "You have to specify a valid author." error related to that. Do you get the same thing, or could I have done something else to mess it up?
best,
Mike
Having the EXACT same issue
Having the EXACT same issue with "You have to specify a valid author" once I work with a modified hook_username in my theme. Did anyone find a fix or workaround for this issue?
FIXED
It appears that there are some flaws with using the user's "real name" field.
NOTE: Mad thanks (rb7) for this comment:
http://drupal.org/node/47308#comment-832715
Here is a version of my theme's theme_username function, if it helps anyone:
<?php
/**
* Implementation of theme_username()
*/
function MYTHEME_username($object) {
if ($object->uid && $object->name) {
profile_load_profile($object);
$rewriteName = $object->name;
//Try to gather the First and Last Name pair
if ( !empty($object->profile_firstname)) {
$rewriteName = $object->profile_firstname;
if ( !empty($object->profile_lastname)) {
$rewriteName .= " " . $object->profile_lastname;
}
}
//Favor a Real Name field
if ( !empty($object->profile_realname)) {
$rewriteName = $object->profile_realname;
}
// Shorten the name when it is too long or it will break many tables.
if (drupal_strlen($rewriteName) > 20) {
$name = drupal_substr($rewriteName, 0, 15) .'...';
}
else {
$name = $rewriteName;
}
if (user_access('access user profiles')) {
$output = l(check_plain($name), 'user/'. $object->uid, array('attributes' => array('title' => t('View user profile.'))));
}
else {
$output = check_plain($name);
}
}
else if ($object->name) {
// Sometimes modules display content composed by people who are
// not registered members of the site (e.g. mailing list or news
// aggregator modules). This clause enables modules to display
// the true author of the content.
if (!empty($object->homepage)) {
$output = l($object->name, $object->homepage, array('attributes' => array('rel' => 'nofollow')));
}
else {
$output = check_plain($object->name);
}
$output .= ' ('. t('not verified') .')';
}
else {
$output = check_plain(variable_get('anonymous', t('Anonymous')));
}
return $output;
}
?>
If the above code doesn't display well, check this out instead:
http://drupal.pastebin.com/f4a2c25e5
:)
- Chad
Mixed up link?
The "read the full description" Link links to the "Theming Basics" product. Not the "Advanced". Intended?