September Denver Drupal Meetup Recap

Jason Yee

September's Denver Drupal meetup was packed, not only with attendees, but also with information as all of the night's presentations were "lightning talks" - 5 minute presentations followed by a maximum of 2 questions. We started the night with the usual round of introductions along with the (mildly horrifying) question of, "What would you use, if you couldn't use Drupal?" The answers covered a broad range of existing open source CMS products, but my favorite response was from Jordan, who said, "I'd stop building sites and go teach hang gliding.... [pause]... Oh, I'd have to learn how to hang glide first!"

Greg started the lightning talks with a quick presentation on the Search by Page module. One of the common problems with the search functionality in Drupal core is that it does not index views or other non-entity data. Greg demonstrated in a fictitious "Hot Dog City" site how the restaurant's menu was created as a view of individual items. Using the standard Drupal search, entering the terms "tempeh dog" returned a link to the Tempeh Dog node, but the desired functionality is to return a link to the restaurant menu page (view). Search by Page accomplishes this by first offering configurations to stop indexing content types. In this example, individual food items like the Tempeh Dog were removed from search results. Second and more importantly, Search by Page allows you to specify paths to be added to the search index along with the user role that should be used to view the path (since the viewing user role can alter the content of the page). This allowed him to add the path for the restaurant menu to the search index. Rerunning the "Tempeh Dog" search with Search by Page enabled and configured now resulted in a link to the restaurant menu instead of the Tempeh Dog node.

John followed with a quick presentation on how he created an ajax based interface to allow inline editing of content. The general overview of how this worked was to use jQuery's serializeArray() to pass multiple field values to a callback specified in a hook_menu(). John recognized that his solution wasn't necessarily the "Drupal way" to solve the problem and asked for feedback. My first response for feedback is that while there are often best practice or "Drupal ways" to solve problems, the beauty of Drupal is that there are often many ways to solve a specific problem. Some people see this as a flaw (because it allows for bad code/solutions), but it's also a benefit because it allows you to craft solutions quickly based on what you already know about Drupal without having to spend huge amounts of time researching more technical aspects of Drupal. All that said, the "Drupal way" to solve the problem is to generate a form array where the form elements use the #ajax attribute to specify a callback. There are a number advantages to using #ajax: the AJAX call and response functions are handled for you and you simply need to write the callback to handle the submitted data; Drupal protects the data from cross site vulnerabilities; and using the form API allows for better integration with the rest of Drupal.

Joel sped through his presentation, demoing not one, but two field modules in just 4 minutes! The first was FileField Sources, which extends the FileField module by allowing you to reference files that have already been uploaded to the webserver. This is extremely helpful when nodes need to reference files that are too large to be uploaded through the node form (e.g. due to low php file upload limits) or files that might be automatically loaded on a server (e.g. scheduled FTP transfers). Once installed, FileField Sources adds a "Reference existing" link to existing FileFields. Clicking the link presents a dropdown of available files on the server. The second module highlighted was References, which was part of CCK in Drupal 6. While many CCK fields were included as part of core in Drupal 7, References remained a separate module. References creates fields that can contain references or ids to other nodes or users.

Scott's lightning talk encouraged everyone to get involved in full project code review. In order for users to create full projects (modules, themes, etc) on Drupal.org, they must have their first project reviewed by the Drupal community. This ensures that the user is writing secure code that follows Drupal coding standards and best practices. The problem is that there are a lot of projects that need review and very few people actually reviewing them, so this is a great place to lend your help to the community. While the term "code review" sounds technical and daunting for non-programmers and those who are new to Drupal, a major part of the review process is simply checking that a project does what it claims to do. That portion of review is as easy as downloading the project, installing it, seeing if it works and reporting back to the project application's issue queue. When reporting back, it's helpful to include as much detail as possible, especially if you can't get a project to work because it's broken or lacks documentation. For more information about code review or to see a list of the projects that need review, join the Code Review group.

Chris wrapped up the presentations with an overview of a site he built that allows the US government track their fuel usage and promotes the use of cleaner, alternative fuels. Starting with large CSVs files, Chris used Migrate to import the data into Drupal. Next, he used Views to organize data and FusionCharts to display the data so that government fleet managers could more easily understand the information.

Despite packing so much Drupal information into the meetup, it seems there's never enough time to cover everything people want to discuss. Following the meetup, we continued conversations over food and drinks at Interstate Kitchen & Bar. The Drupal dialog is never ending and we'd love to see you at the next Denver Drupal meetup, but if October 25 is too long to wait, join us in the #drupal-colorado irc channel, one of the other Colorado meetups (see the Colorado Drupal groups page for more information), or the upcoming Open Office Night hosted by Examiner.com.