Chapter Three LLC

Planet Drupal

Chapter Three Goes Gold

Josh Koenig

Chapter Three is an Acquia Gold PartnerIt’s with great pleasure that I announce that Chapter Three is now an Acquia Gold Partner. This is a move that makes perfect sense to us as a business, and I’d like to quickly make the case as to why.

Drupal Market Growth

Acquia’s business depends on the continued growth of the Drupal marketplace. It’s simply essential for their success, and the more people who are using Drupal, the better off we all are. Moreover, Acquia is proactively marketing and selling the platform in enterprise markets and new verticals, which is going to pay huge dividends down the road.

I believe in this because of what we experienced with a plucky little upstart organization called CivicSpace. The work that Zack, Neil, Kieran and others did back in 2004 putting together a packaged Drupal distribution and making an energetic effort to evangelize it to the world of non-profits resulted in a huge spike in interest in Drupal from that world. This persists as a cornerstone of the present-day Drupal market. I’m hopeful that Acquia will have similar success, especially as over the past four years, Drupal has grown into a much more mature platform with a much clearer value proposition vs. proprietary CMSs.

Business Development Pipeline

Following on the above, one of the reasons we wanted to jump on the Acquia partner bandwaggon is, frankly, to work with more and better clients. While we’re all capable representatives of our business and of Drupal — and we think our portfolio is pretty dang impressive already — our passion is in the work: the conception, planning, strategy, design and execution; not so much in the sales process.

While we’ve never had a shortage of business inquiries (now accepting RFPs for winter/spring 2009) it’s also true that the best and brightest prospects often require a proactive business development effort, and a lengthy courtship. We see Acquia as helping our firm in this process by laying the groundwork and making qualified introductions, letting us remain focused on our strengths.

Long-Term Support

Unlike many web development shops, our model is based around building up exciting new projects, not long-term support contracts. However, clients still often want and need longer-term Drupal support. While we’ve had good experiences addressing this by building capacity — training and limited expert-support for internal experts — the simple truth is that many of our clients would feel a heck of a lot better with a traditional tier-1 support resource. This isn’t something we can realistically provide, but we hate saying no. Enter Acquia.

The ability to offer them the piece of mind that comes from using Acquia’s commercial support gives everyone what they want: we can move on to the next big challenge with a clear conscience, our clients get world-class support for their Drupal website, and Acquia gets subscribers. That’s a win-win-win situation.

In Conclusion

We’re glad to be on board with Acquia and with the development of Drupal into a viable commercial product powerhouse. We’re already seeing benefits in the marketplace, and although the overall economic picture points towards some slowing, the internet is now an integral part of every major economy and business. This marketplace isn’t going away.

In fact, in this economic context, I think Drupal is a good bet. With budgets tightening, clients will be looking much more seriously for value. As expensive proprietary software-as-service licenses come up for renewal, we expect to see more conversions to Drupal as businesses and organizations continue making the leap away from costly/brittle proprietary systems and embracing the freedom, flexibility and bottom-line value of commercially-supported Open Source.

(Also, we chose gold because we have to stay one step ahead of our flat hat awesome friends at Zivtech)

Panels 2 and Vegan Donuts at BADCamp 2008

Matt Cheney

BADCamp is the Bay Area Drupal social event of the season. All of the cool drupal genius kids come out to socialize and make fantastic Drupal presentations. Attended by hundreds of Bay Area Drupalers, its really wonderful to see that kind of vibrancy in our local community. A big thanks to Tao Starbow and other members of the BADCamp planning group.

It is a lot of work to put on a Drupal camp. To do our part to help with this year’s event, Chapter Three organized breakfast for all three hundred conference attendees on both Saturday and Sunday. We served hipster hip coffee from the Mission District, vegan donuts from Berkeley, an extended selection of juices, fruits, and bagels (with vegan cream cheese). Many thanks for this organizational effort goes to Rachael Boggan, our community and company liaison for excellence.

Columbus Day? Drupal Day!

Josh Koenig

Hot on the heels of an awesome BADCamp, we decided to take the holiday of Columbus Day and turn it into a much-needed Drupal Day! A lot got accomplished, and I for one am very happy about the results.

Drupal Dojo

My single greatest personal contribution to the community thus far hasn’t been code, but rather an idea, some video content, and six months worth of organizing. Nearly two years ago, I started the Drupal Dojo to help incoming developers wrap their heads around the open source project we all know and love. Seemed like something that was needed, and it was tons of fun and a great success, but in 2008 I haven’t been able to do nearly as much, and the group has become less active.

But now, with more and more A-list contrib modules ready to roll and a bunch of number of other factors — e.g. Acquia Drupal — on the scene, it feels like the same kind of moment for Drupal 6. I predict explosive growth in the developer community. And so, once again, I’m getting back in the game and will start producing a new set of Dojo lessons starting in November.

6.0 Releases

I also had time to clear out some issues, test some patches, and finally commit some long awaited code. The result is three new Drupal 6.0 module releases:

  • Up/Down: in the spirit of solving obvious problems, this is a solid and serviceable implementation of a plus/minus voting widget for 6.0. With initial code from Greg Hines and awesome token support by dmitrig01, it’s stable, secure and ready to pick up where good old vote_up_down left off. I really hope to turn this into a widget on par with the excellence that is fivestar.
  • Menutrails: officially out for 6.0, this brings some common-sense usability goodness to your Drupal site. Keep navigation menu items active, bread-crumbs under control, and dynamically assign your many nodes to automagically show up under the right primary nav elements.
  • Textile: still my favorite HTML shorthand. This one was easy thanks to trevorwining for the patch that made this possible.
  • OG Panels: not all the way there yet, but my patch to bring this into 6.0 made some real progress this weekend.

But Wait, There’s More!

In other exciting Drupal news, my colleague Jon Skulski got a patch to the 7.0 core marked ready to be committed. It’s really great to see people who only started seriously working with the system in the Summer getting up to the “I kick ass” threshold. Jon brings a lot of skills to the table, and with any luck we’ll be seeing more amazing things from him in the months to come.

Also, I believe we’ve recieved enough positive reviews on the Drupal for Firebug FireFox extension that it can graduate from “experimental” status, which is key for our next release. Still, if you’d like to help us out, write a review so the Mozilla folks will be more inclined to let users install the plugin without first signing up for an account and going through a scary opt-in process.

With jQuery integrated in the 0.0.5 version, we’re now able to do the kind of UI work that’s really needed to make sense of all the data we can dredge out of the system. We’re also set to make asynchronous calls for more information. Basically, we should be able to make DFF the programatic ying to the Theme Developer module’s yang. We hope to make it another invaluable part of the professional Drupal developer’s toolset.

All in all, it’s hard to hope for more from a good Drupal Day. With any luck, these will start to become a regular occurrence around here at Chapter Three!

Moblin.org Launches on Drupal 6.0 w/Menu Trails

Josh Koenig

Moblin.orgChapter Three is pleased to announce that Moblin.org, the developer community for a worldwide effort to build a better Embedded Linux platform (with the involvement of the likes of Intel), has re-launched on Drupal 6.0.

This is our first big project to get out the door on Drupal 6, and I’ve got to say it was a really great experience. Getting oriented was a bit of a challenge at first, but there are so many common-sense improvements to the Module API and Theme layers, it makes development easier than ever.

In addition to utilizing the latest releases of Organic Groups, CCK and Views, Moblin features a completely re-vamped and re-built Menu Trails module, which we’ve developed to add some usability goodness to Drupal’s default Primary/Secondary links and Breadcrumbs. Menu Trails allows individual nodes to automatically appear “under” an existing menu item based on their type, taxonomy, and now Organic Group. This is then reflected throughout the visible nav hierarchy, and now in the breadcrumbs as well:

Menutrails In Action

Look for an official 6.0 release within a few weeks, featuring all of the above, plus pathauto integration and more.

Moblin also features a number of developer-centric innovations such as shared authentication and status updates from Bugzilla, as well as project-level integration with Git for updates via RSS. These were developed on a custom basis since they’re particular to the back-end system architecture of the project, but in my opinion a huge part of the appeal of Drupal it’s power as a platform which allows for powerful custom integration to be developed rapidly, safely, and extensibly. Drupal performs very well at the center of a Web 3.0 “cloud”.

There’s sure to be more to come as the Moblin community rallies around their 2.0 launch and begins a big push over the next year. It’s quite encouraging to see this kind of synergy between Open Source projects. We at Chapter Three are definitely excited for what’s next.

Riding Your Bike the Drupal Way

Matt Cheney

It is sort of disappointing how goofy many cyclists look. Bicycling is such a wonderful thing and can be done with such great beauty, why do all the cycling jerseys need to be plastered with dull logos and inconsistent colors? We should leave the confusing and overlapping advertisements to Times Square and the Sunset Strip.

Perhaps that is just the way it is, but if we are going to have jerseys plastered with logos I think we know a good one to use. It is always wonderful to roll with a little style and when you mix it with Drupal, all good things.

The cool kids showing off the jerseys below are San Francisco’s resident drupal genius Neil Drumm, fixed gear extraordinaire Zack Rosen, and always classy Josh Koenig.

The jerseys were designed by one of our cycling friends and manufactured by Canari Cyclewear. We did an initial run for our friends and family, but if you are a cyclist and would be interested in a jersey let us know. We are considering doing another run, perhaps as a fundraiser for the association.

Drupal Elegance: Not Just For Code Anymore

Matt Cheney

We all love the elegance the Drupal. The code style is clean, the architecture beautiful, and it’s all pretty well thought out. Plus the logo is pretty amazing.

To find a fitting tribute to our favorite content management system, I spoke with a friend from college, the very elegant Lilly Russo, who makes amazing glass mosaics through her business in Oakland, California.

Drupal for Firebug: Firebug talking Drupal

Matt Cheney


Firebug is a hell of a thing and at Chapter Three we use it regularly - as many others do - to analyze and debug our web development work. It can do things like inspect the HTML, manipulate the CSS, execute and debug Javascript, and monitor site performance and download times. It is so great that we wished it spoke Drupal and knew our name - kind of like the cute girl at the dance. Things get a little better when people know your name.

It is in that spirit that that Drupal for Firebug was developed as a way to extend the capabilities of Firebug by mixing in a little Drupal. Drupal for Firebug is both a FireFox Extension and a Drupal Module. To celebrate Drupalcon Szeged there are now releases for both Drupal 5 and Drupal 6 available. Get the extension and download the module, check our the test and demonstration site, and watch the drupal magic happen right in your Firebug window:

With a copy of the module and the Firefox extension installed, a developer can see debug messages, examine the SQL query log (with Devel module), look at how a Drupal page load is handling a site’s users, views, nodes, and forms, and even execute PHP. The goal of the module and extension is to create a framework for centralizing Drupal development and debugging work using power of Firebug. The major features include:

  • More centralization of web development debugging information by moving that information from Drupal page view into separate Firebug window. This helps to provide a clean separation of development debug information from the rest of the site.
  • Clean and external debugging message text and dumpable PHPs arrays and objects which can be displayed in the Firebug debugging window using the handy firep() function where they can be viewed without disrupting the rest of the page flow. There is also a handy “debug message only” search feature which is helpful in locating specific pieces of information in the debugging output.
  • Integration with the wonderful Devel module is available to provide a Firebug accessible SQL query log. Since the Firebug debugging window can be resized, hidden, or broken out as a separate window, it provides additional options (beyond appending the log to the bottom of the screen) for viewing the SQL query log.
  • Complete information about each user and node and view and form that is accessed during a page load is available. This can be invaluable in determining what Drupal items are being referenced and what $op is being performed on them. There is awareness of the original and modified state of the view and form items and even smart color highlighting to tell you when additions, changes, or deletions have happened to the item during the hook_form_alter or hook_views callbacks.

This is only the initial release of the module and there are plenty of tweaks and improvements to make down the road. The real secret sauce will be figuring out what are the most useful pieces of information to display in the Firebug window and making some important XUL interface improvements to the Firefox Extension to increase usability around the viewing and sorting of debugging data. Think HTML browser style functionality for the User, Form, Node, and View arrays and objects. But for now, at least it speaks our language.

HOWTO: Utilize Drupal 6-style "preprocess" theme architecture in Drupal 5

Josh Koenig

Once of the biggest advances “under the hood” in Drupal 6 is the addition of the preprocess architecture to the theme layer. This is part and parcel with the deeper embedding of template files, and together they render Drupal 6 the most flexible and powerful release yet in terms of theme and design.

For those of us who still do a fair amount of work with the 5.x branch, it’s easy to be envious of those lucky enough to have these new tools at their disposal. But resist that cardinal sin! This quick HOWTO explains how to quickly turn your theme into a node-preprocessing machine, which has great benefits in terms of elegant architecture, and also future-proofing your work for the eventual Drupal 6.0 migration.

Bulding off _phptemplate_vars()

Possibly the most powerful programmatic tool in the Drupal themer’s toolkit in 5.0 is the _phptemplate_vars() function. We’ve talked before about to use this to use different template files under different circumstances. Overall, this function is a great way to make all those minor changes that are needed so that a site can have truly top-notch appearance and user-interface.

However, once your theme gets to be very complex, this function can easily become an overloaded beast of logical branches. Each new node type or special case creating new complexity, and maintaining that as your site grows can quickly become untenable.

Fear not, though. You can also use this function to implement a simple preprocessing architecture that will help you customize the data in all your node types without creating a mass of template files, and set the table for 6.0. Here’s how:

<?php
function _phptemplate_variables($hook, $vars = array()) {
  switch (
$hook) {
    case
'node':
     
$node = $vars['node']; // handy shorthand
     
$preprocess = 'phptemplate_'. $node->type .'_node_vars';
      if (
function_exists($preprocess)) {
       
call_user_func($preprocess, $vars);
      }
      break;
    case
'page':
    

 
}
}

function
phptemplate_blog_node_vars(&$vars) {
 
// your custom preprocessing here
 
$node = $vars['node']; // handy shorthand
 
drupal_add_css($vars['directory']. '/custom_blog_style.css'); 
 
$vars['submitted'] = t('Blogged by !name on !date', array('!name' => l($node->name, 'user/'. $node->uid), '!date' => format_date($node->created, 'custom', 'm-d-Y')));
}
?>

Note that you don’t need to use phptemplate_ as the prefix here; indeed it may be advisable to use your theme_name.

What this function does is quickly check for the existence of a node-specific preprocessing function, and if it exists passes through the $vars array by reference.

In this case we detect that a blog node is being rendered, and take the opportunity to include a final custom stylesheet form our theme, as well as altering the standard $submitted var.

The possibilities here are endless, and in “enterprise theming” situations where you may be dealing with upwards of 25 (or even 100!) node types, having this kind of programatic structure in your theme is invaluable for keeping things clean, elegant and extensible.

Good luck, and happy drupal theming!

HOWTO: Use TinyMCE in a Panel Pane Popup

Matt Cheney

The magic of Panels 2 is just the sort of thing you might expect from a wizard. Users can create pages with flexible and customizable layouts, they can populate those pages through an extensible block system, and they can configure and drag-and-drop those blocks around the page. Check out the demo page.

Sadly, the panels system does not allow its textareas to be used as TinyMCE WYSIWYG areas because of the way javascript and javascript events are handled. The basic problem is that TinyMCE runs on page load and is not set up to be activated on the Panel pane textareas that are created after the fact. This is a problem that hopefully the Drupal 6 version of Panels can resolve, but for Drupal 5.x the following hook_form_alter solution is possible.

First you need to set up a hook_form_alter callback as part of a new custom module or as part of an existing module you are modifying.

function my_module_form_alter($form_id, &$form) {
  switch($form_id) {

Second you need to render a hidden TinyMCE field on each panels editing page. This is not a particular clean way to proceed, but it will ensure that all of the appropriate TinyMCE .js is loaded on each page.

    case 'panels_edit_display':
      $form['tinymce_hidden'] = array(
        '#type' => 'fieldset',
        '#attributes' => array('style' => 'display: none'),
      );
      $form['tinymce_hidden']['tinymce_prerender'] = array(
        '#type' => 'textarea',
      );
      break;

Third you need to assign a special submit handler javascript call to convert all TinyMCE content back into its normal textarea content so it can be appropriately saved when the Panel pane is submitted.

     case 'panels_content_config_form':
       $form['next']['#attributes'] = array('onclick' => 'tinyMCE.triggerSave(true,true);');

Finally each of the textareas that are being rendered on the panel pane page need to have a special enable/disable TinyMCE link assigned to them. This allows users to turn on the TinyMCE functionality if they want. The code belows assumes your default TinyMCE state is off. I am sure there is a better and more generalized way to add these links, but this is a first step.

       // Load a disable or enable link below each textarea
       global $user;
       $enable  = t('enable rich-text');
       $disable = t('disable rich-text');
       $user = user_load(array('uid' => $user->uid));
       $profile = tinymce_user_get_profile($user);
       $status = tinymce_user_get_status($user, $profile);
       $link_text = $status == 'true' ? $disable : $enable;
       foreach($form['configuration'] as $index_raw => $value) {
         $index = str_replace('_','-', $index_raw);
         if ($value['#type'] == 'textarea') {
           $form['configuration'][$index_raw]['#description'] .= "<div><a href=
\"javascript:mceToggle('edit-configuration-$index', 'wysiwyg4-configuration-$index');\" class=\"wysiwyg-editor\" title=\"edit-configuration-\"" . $index . "\" id=\"wysiwyg4-configuration-$index\">$link_text</a></div>";
         } else {
           if (is_array($value)) {
             foreach($form['configuration'][$index_raw] as $index2_raw => $value2) {
               $index2 = str_replace('_', '-', $index2_raw);
               if ($value2['#type'] == 'textarea') {
                 $form['configuration'][$index_raw][$index2_raw]['#description'] .= "<div><a href=\"javascript:mceToggle('edit-configuration-$index-$index2', 'wysiwyg4-configuration-$index-$index2'); \"  class=\"wysiwyg-editor\" title=\"edit-configuration-\"" . $index . '-' . $index2 . "\" id=\"wysiwyg4-configuration-$index-$index2\">$link_text</a></div>";
               }
             }
           }
         }
       }
      break;

And you should be good to go.

  }
}

Sun, Drupal, and Chapter Three

Zack Rosen

In May, Sun Microsystems approached us for assistance in launching a very cool social media site they were building in Drupal. Two months later we launched the Sun Video Learning Exchange, designed to let Sun staff easily publish training videos and resources to their global network of support engineers and customers. From the time of project kick off we had two months to complete two design passes, develop all features, test, and launch the site. Work progressed smoothly much in part to a very agile work process that paired our team with internal Sun developers working side by side to launch the site.

The site is a great showcase of the comprehensive media handling functionality available now in Drupal. Apart from the integration with LimeWire to store and transcode content and integration with Sun’s LDAP directory for authentication, the site is built entirely with very standard Drupal modules including Views, FiveStar, and Community Tags. It was a real pleasure for us to work with Sun to develop the Learning Exchange and we are really looking forward to seeing what else they can do with Drupal.

Syndicate content