- Happy to see my fellow entrepreneurs in Santa Cruz moving forward. Congrats to the Rally Up team! http://bit.ly/dwYJCT — 1 day 11 hours ago
Drupal Planet
Matthew Saunders: Drupalcon CPH - Sharpen your Axe
Richard Jones of iKos gave a presentation on simplifying and streamlining the development of Drupal sites. His team observed that they were creating the same basic sites over and over again. To this end, rather than starting from scratch each and every time, the team created basic sites to start from and rapidly built out the basic site for a client in several weeks. This allows the client to start entering data early in the process - which means come theming time, you are working against real client data. This is a plus when you are trying to achieve the results your client is seeking. In the iKos model, design comes last and is somewhat subject to the functionality that has been developed.
iKos set the the goal to reduce Drupal development time by 80% - to radically reduced the repeated effort that the company engaged project after project. They created a model of a site "startpoint" that begins each new client effort.
Dale McGladdery: Creating and Updating Nodes Programmatically in Drupal 7
The steps for programmatically creating a node are:
- Create a PHP object representing the node data
- Save the object using the node_save() function
While the mechanics are simple, there is an important responsibility involved. The Drupal work flow does data validation before calling the node_save() function; node_save() does no validation. By calling node_save() directly your code takes the responsibility for providing valid data.
Drupal 7 ChangesA quick note for those of you familiar with Drupal 6. You'll notice two changes in Drupal 7:
Body Field Is No Longer Special
In Drupal 6 the body field was special. Specifically, it had a different data structure than other fields and it always existed, even if it wasn't used. With Drupal 7 the body field is a standard field provided by core and is truly optional.
Language
Language specification is required for the node and some fields.
Basic Node CreationThe following code assumes an unchanged Drupal 7 Standard installation and will create a Drupal 7 article node.
Metal Toad: What's in a framework, experiences from Rails and Drupal
I've now been working professionally in Drupal for a year and have learned a lot about it; I have some patches into contrib but I've not really done much with core other than some simpletests I was too shy to commit at Drupalcon and some comments trying to help people out on d.o. Prior to my stint as Drupal programmer I was a hardcore Ruby on Rails developer for about 4 years. Over the last two years in particular I've learned a lot about frameworks and I'd like to share an observation about which framework feels right to me for which situations and why.
Metal Toad: Semantic Views is Awesome
Like any Drupal themer, I've done my share of grumbling about the frequently ridiculous level of nested divs with dozens of classes. I'd heard some people mention a module called Semantic Views, but I never really understood what it was for until I found this video. If you don't understand what the big deal is either, take the four minutes to watch. It's a total "ah-ha!" moment. I'm happy to say that I just used Semantic Views for the first time on a client site, and it's just as awesome as everyone says. It saved me a ton of work and let me get exactly the markup I wanted, even while working around Chuck's nested views.
Vladimir Zlatanov: Entities, Bundles, Fields and Field instances
Drupal 7 introduces a number of new apis and with those comes new jargon. Untangling that could be daunting. I'll try to briefly sketch what is what and relate it to terminology outside of the Drupal world.
FieldsLet's start with fields. They are the incarnation of the CCK fields moved to Drupal core. Finally. It took about five years, the hard work of a lot of people, unmentionable number of debates and patches. And it is worth it. But what are fields? One answer can be found at Field Api. In essence, a field is a primitive drupal data type implementing the interface described in those pages. For example file field, text field, etc... Modules can define new field types.
Lullabot: Drupal Voices 158: Emma Jane Hogbin on PHP for Designers
Emma Jane Hobgin (aka emmajane) gives an overview of her DrupalCon San Francisco presentation on PHP for Designers. She talks about the importance of pattern recognition and forensic coding, some helpful modules such as Devel Themer as well as some of the basics of Drupal theming with tpl.php files and preprocess functions within the template.php.
For more information, be sure to check out her PHP for Designers presentation.
John Albin Wilkins: Converting a Subversion repository to Git, (7 steps to migrate a complete mirror of svn in git)
When I first realized that I needed a version control system, the best system at the time was CVS. (No, really.) Subversion was nearing 1.0, so I waited for its release and then used it everywhere. Well, that was 2003. Time for a change.
This past year, it became obvious that there were many Git users within the Drupal community, so Drupal has decided to move to Git. Since then I've started learning and researching the best ways to convert all my development to a Git-based workflow. So far… it rocks.
Engineered Web: Performance Is Green
Are you writing and using environmentally friendly software? Have you ever thought of the impact on the environment for the software you've written? Working in front of a computer it can be easy to overlook the impact on the environment due to what were creating. It's not like drinking a beverage out of a styrofoam cup (they don't break down). But, there is an impact. As Internet usage grows in leaps and bounds we need to start taking a closer look at that impact and doing something about it.
Why Performance Is GreenWhy did Facebook start using Hip-Hop? According to their blog,
With HipHop we've reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page. Less CPU means fewer servers, which means less overhead.
When we have less servers we use less power, we need less space in buildings, less servers need to be built for our tasks and our overall footprint is smaller.
Think about it like this. We buy energy efficient appliances, we talk about turning lights off when we aren't using them, we look at energy efficient cars, and we think about being environmentally conscious. So, why not extend this to what powers our websites.
Gábor Hojtsy: How Drupal improves and evolves, the basics behind the community
It is that phase of my life! I'm just turning 30 in a month, working with Drupal for 7 years and just had my third Acquia anniversary a week ago. Time to look back and evaluate how things went, all the good and bad things; even better if the wisdom can be shared with others. This was part of my thinking when I submitted the session titled "Come for the software, stay for the community" for Drupalcon Copenhagen. I was interested to distill and share how Drupal came to be as unstoppable as it is, what core values lie behind it, so someone coming fresh can understand and integrate with these.
When Dries Buytaert started Drupal he made a few key decisions which launched the project and kept being governing principles ever since. First of all he decided to make it free and open source, and release it under the GPL. The choice of one single license helps you use all the Drupal components together without the requirement to consult lawyers. Also, the choice of GPL in particular ensures that derivative works are distributed in the open as well.
Matthew Saunders: Drupalcon CPH - Commerce Guys Talk Drupal Commerce
Ryan did a session on the new version of the D7 Commerce Module. He was the original writer of the Ubercart package - a main stay of ecommerce sites in Drupal 6. His self deprecating humour at the beginning of the session was charming as Ubercart was his first segue into many aspects of Drupal and it has become the defacto leader of the pack for Drupal ecommerce sites.
His new offering is looking very slick, making use of fields in core for example, and while Ryan tells us it isn't quite ready for primetime (he's still building out features) it looked pretty good.
Video from this session is below in seven sections. The original first video was only 4 seconds long.
Kristof De Jaeger: Benchmarks for the Display Suite module
I've been promising benchmarks for the Display Suite module after every presentation I gave so far. It took me a while to get a good setup but now it's here. I've used the demo site as a start, so there are a lot of modules enabled for this test. Views, panels, fivestar, heartbeat, comment, taxonomy, location, gmap, imagecache are the most important ones since they all integrate with the ecosphere of Display Suite modules.
I added a new content type called 'benchmark' and added 14 CCK fields to it: 4 textfields, 4 textareas, 2 images, 2 filefields, 1 node reference and 1 user reference. It also has a title, body, 2 taxonomy fields, a fivestar widget and a couple of comments.
Depending on the test, the complete set of modules integrating with Display suite are enabled or disabled. These include ds, ds_ui, cd, hds, nd, nd_cck, nd_search, nd_fivestar, nd_location, nd_switch_bm, ucd, ud and vd. You gotta love small project names right ?
<!--break-->
The first test was ran on my Fedora Core 13 desktop - Intel Core Quad, 2 GHz, 2MB RAM with php 5.2.13 and eAccelerator - ab sending 100 requests with 5 concurrent users on a single node and page caching disabled.
I Can Localize: How to Translate Interface Strings
Translating interface strings is always a painful process. Actually, it's difficult to achieve in many content management systems, not just in Drupal.
Unlike node contents, interface strings can come from many different places.
They can be part of Drupal core, from modules, themes or dynamically generated by the site's admin.
The hard part is locating these interface strings which appear to site visitors and translating them. To visitors, it doesn't really matter where the strings come from. All user-facing strings must be translated, for the entire page to appear in the right language.
Choosing Strings With The Localization Client Module
The localization client allows searching for untranslated strings easily. For site admins, the most important feature is the ability to spot strings as they are used on public pages.
Once installed and enabled, the Localization Client opens a panel at the bottom of public pages. These pages are viewable to admins only and not to site visitors.
Lullabot: Command Line Basics: More Editing with Vi/Vim
This video picks up where we left off in the Editing with Vi/Vim video. This time we take a look at some shortcuts for replacing text, how to copy/paste, and the cool visual mode feature you get with Vim.
Scott Hadfield: Drupalcon is dead. Long live Drupalcon?
With Drupalcon Copenhagen now behind us and Drupalcon Chicago approaching, I've found myself thinking about what Drupalcon is and how it's changing.
My first Drupalcon was in Barcelona, I was lucky enough to get to tag along with the guys from Bryght. I had an absolutely amazing time and met dozens of people, many of whom are now quite close friends. To top it off I also met my now fiancee and a future boss (no longer my boss, but still a good friend).
Since then, the twice yearly Drupalcons have consistently been highlights in my year. It's often the only time I get to see many of my friends in person.
Matthew Saunders: Drupalcon CPH - The Final Session
Many thanks to everyone who made Drupalcon CPH happen. The final session is a suitable (if silly) ending to what was a very productive week for me. Lots of meetings, reconnecting with old friends, and sessions.
The greatest silliness and fun in the session were the Kitten Killers - you can see just that piece of the presentation here (again and again and again).
If you just want to see the final session from beginning to end - I've posted the entire session below. The second to last is the Kitten Killers.
Matthew Saunders: Drupalcon CPH - The Kitten Killers
Have we replaced the Drupal Song? At the end of the final session, the Killers played a new song, "I Can Be Your Module, You Can Be My Theme". It was a fun and silly way to end the main part of the conference and segue into the sprints.
The song was fun and sounds like it would be really easy to sing again and again and again.
Here's hoping it has been placed in the public domain.
Acquia: Facet queries? Making custom Solr facets for fun and profit.
It sounded like a really simple request: "Is it easy to add a search filter for 'My posts'?". In other words, add a search result facet for posts by the current (logged in) user through the Apache Solr Search Integration module APIs?
But then the wheels start turning - we want not just one blind link, but a real facet link that tells us how many results we'll get. Also, if we are filtering by 'My posts' then we probably have an equal use case for the opposite filter 'Posts not by me'. So we really need a facet block with two links and facets counts.
Thanks to the fabulous feature set of Apache Solr 1.4, figuring out how to code up a basic implementation of this turned out to require just a few minutes on the Solr documentation wiki exploring facet options to settle on facet queries as the right solution for this problem. Facet queries let you define new facets based on arbitrary query syntax. This example is a pretty simple one, but I hope you can expand it to any sort of custom set of filters or facets that your Drupal + Apache Solr integration requires. Here's what the result looks like:
John Forsythe: Major SEO Mistake Affects Most Drupal Sites
Every day, millions of people use Google Image Search to find pictures, products, and people. If you're using Drupal, chances are you're not getting any of this traffic.
Here's why:
Drupal's robots.txt file contains a major mistake. Amazingly, the mistake has been there for years, and very few people seem to know about it.
Lullabot: Lullabot's Back to School Sale
The school year is starting up, DrupalCon CPH is over and it's time to learn Drupal! For those of you who've been waiting for the perfect time to grab your copy of one of our awesome Learning Series videos, now's your chance to save big. Now through Friday, September 3rd you'll aget 25 percent off your purchase of any physical or downloadable product in the Lullabot store by using the coupon code SCHOOL25. That includes ALL of our Lullabot Learning Series videos and video bundles!
To get this special savings, just use the coupon code SCHOOL25 at checkout and place your order before the sale ends! Tell your friends and share it with others, there are no limits on this coupon code, but it ends Friday, September 3rd.
Visit store.lullabot.com (or click the "store" link in the menu above) and shop for whatever's been tickling your fancy.

