Drupal

I'm in Planet Drupal (blame Rob)

So, in the tradition laid out by Ken here's a "first post" into Planet Drupal now that my feed is getting picked up there. It probably also means that I'll have to work a little on performance modules lest my site get bogged down with the extra traffic.

I don't have much to say except that stuff like being included in the Drupal Planet Aggregator is about as exciting as when my first patch got committed. Maybe it's much ado about nothing, but I think that little stuff like this is what gets people excited about being involved in a project. So, it's very cool.

My involvement with Drupal is based around a small business looking to help other small businesses and communities to get a great website. Ideally a website that will get them laid. There's lots of people in Denver/Boulder who are using Drupal so I sent out some emails and started getting people together for meetups which has spawned the Denver Drupal User Group we're small and turnover is high, but Matt and Mike are getting some value out of it.

In truth, it was these screencasts that got Rob excited enough to ask me to get a feed for Planet. Which is a subtle way of saying you should blame Rob if you find my posts boring.

Improve Drupal Without Any Work

Lots of times people will ask open source projects how they can help if they aren't a coder. Generally every person can review documentation, help with translations to other languages, maybe donate some money, help with bug triage, and of course do person-to-person evangelism.

feedback loops

Feedback loops are the system where feedback about an item is given back to the originator of that item. So, at a restaurant the feedback loop might be from the chef's meal, to your table, to your comment to the waiter, back to the chef. That is fairly tight and it helps the restaurant become better.

In fast food restaurants the feedback loop is long - the chef prepares the food, you get it at the drive through, you eat it, and then maybe a week later you mention to the drive through attendant what you think about the food. She has no idea who your chef was last time and can't do anything about it. This is a "large" feedback loop and is not constructive.

Generally speaking, it's better to have a tight feedback loop

Helping Drupal by closing a feedback loops

In the case of Drupal, a quick change in your module configuration helps the Drupal developers know the most popular modules and themes. Knowing the most popular modules and themes in turn lets developers know where to spend more of their time in debugging, adding features, and improving code. The system works by sending a message back to the drupal.org server letting the server know which modules and themes are enabled, a little bit about the number of users and visitors your site has, and your email address/site slogan/mission. This information is only used in aggregate to help guide resources. Currently, the subject of which modules are used is hard to guess - modules are frequently downloaded, tested out, and discarded so download numbers are unrelaible. This system is a vast improvement on the "download frequency" test.

In a patch to the welcome message, Khalid Baheyeldin of 2bits Drupal consulting has provided these instructions on the welcome page to urge users to enable this feature. It's possible that in future versions it will be enabled by default.

Drupal Contributor Block

There is an optional block in Drupal.org which contains lots of useful links including my favorite, the Bug Bingo link which takes you to a random bug. There is also patch bingo and both bingos are available for core or contrib (contrib patch bingo and contrib bug bingo.

However, this "Contributor Links" block is not turned on by default. New users of the site need to edit their account and set the "Blocks Configuration" to include that block so they will see it.

The thing that is so genius to me about the bug/patch bingo mechanisms is that generally people view bugs and patches as a boring and painful task. Something that must get done but is not fun. Well, by taking you to a random bug or patch, it is kind of fun. You never know what great functionality you are going to hit upon that has a half baked patch, or that needs a patch to be made and maybe you can do that and maybe it will get committed and man does that feel nice.

If you spend 5 minutes a day bouncing on the bug bingo link and do some triage, reassign bugs to the right status/version/category or ask questions to get bugs moving along through the queue you'll 1) be much more knowledgable about the software 2)really help other users of the site get their bugs attended to and fixed. It's great for the project and it even makes bugs somewhat fun to deal with.

There are other fun links in the contributor block that are helpful such as documentation issues, support forum links, cvs messages, etc. It's a handy set of important links to get more out of Drupal and provide more to Drupal.

HOWTO Use Drupal nodes to display information from other sources

I've been asked several times:

"I have data in a database and want to display it in Drupal and probably in a Drupal node. How do I do that?"

Well, here are some thoughts on that question. The answer may depend on the kind of data that you've got. Is it static or do you occasionally update it? Do you want users to be able to edit that data inside of Drupal and have the changes saved back to your database? Do you need Drupal to handle access control?

Just use a node

One solution is to simply use Drupal nodes. Write a script that takes your data and creates a new node - record for record - from your current data. If you have a few columns of data that are selections from a limited set you could convert those to taxonomies: e.g. you have a list of restaurant names with descriptions, a ranking (good/bad/fair) and a restaurant genre (Thai, Chinese, French, B-B-Q) then you could map the name into the title, the description into the body, the ranking into either a taxonomy category or as votes using the vote api, and the genre into a taxonomy category. This is ideally suited to relatively simple data.

Use Flexinode/CCK

Flexinode/CCK allow you to create somewhat more complex nodes where you create the necessary fields and Flexinode/CCK create the underlying database and HTML forms to be able to edit those fields. Then you create a few test nodes manually through the Drupal interface to see how fields get stored in the database and finally write a script to take your data and insert it into the database. It might make sense to make use of the fields-to-taxonomy system described above in addition to Flexinode/CCK.

Qcodo

QCodo is a code generation tool that can be used to create the "CRUD" (Create, Retrieve, Update, Delete). I know of someone working on a way to integrated Qcodo into Drupal. If you're interested in that idea, let me know.

Synchronizing

If it is updated occasionally, you could keep a reference table from your data to the node ID value and create a script that not only creates the nodes but also can update them as necessary.

Drupal 4.7 Released

Drupal 4.7 has been released. Here's the announcement on Drupal.org, and here's the story on Digg.

Very exciting stuff. It's more of an evolutionary released than a revolutionary one in my opiniong, but there's enough evolution that it's headed towards lots and lots of fun. I've been implementing sites based on nightly cvs and betas and release candidates for a while. Now I'll have to start upgrading sites.

SEO Advice

It seems like SEO is the hip new thing to be talking about, so I guess I should talk about it too.

What my clients do

When I'm working on a new site for someone, I do a few things to try to make sure that it is "search engine optimized" but it doesn't take extra effort for me or for the client. I ask them to create the content for their website and create titles that are descriptive. I ask them to get some periodic content (like a forum or a newsletter) about whatever it is that is important to their business or website. And that's it. The website should handle the rest of it for you.

What I do

Me, I just implement Drupal and in my theme and in the features I add to the site (my "module mix") I make sure to follow the Webmaster Guidelines from Google and some of the tips from Matt Cutt's blog.

The Result

The websites rank well. Sometimes for stuff I don't even want them to rank well. For example, on my personal calendar I have some classes I took at The Passionate Palette which is a great cooking school in Southern Denver. Depending on a variety of factors, my personal website ranks in the top 5 sites for the search phrase "passionate palette". I didn't do any magic and no fish oil is involved. Simply building the website the right way from the beginning gets this ranking.

Also note that this ranking is based upon content within my site - i.e. within my control. If someone is going to sell you a link exchange program to get better search engine ranking, ask them why they need to rely on a practice that the search engines disagree with.

I'm in the Lullabot Podcast

Yes, that's right, I was in the Lullabot podcast. I'm not cool enough for Jeff to interview me, but a question I submitted on the podcast tip line () was included in Jeff's interview with Zack Rosen in their 11th podcast. My special piece comes in at about 35:20 into a 53 minute podcast. Definitely the longest podcast I've listened to, but if you're interested in civicspacelabs or Zacke Rosen or any of that stuff, it's an interesting podcast.

Syndicate content