Chris Svajlenka's Blog

You should follow us on twitter or subscribe to our RSS feed if you want to stay on top of all the latest.

Keeping track of page load times in Munin

As part of the services we provide for some of our clients, we monitor web page load times. The Munin plugin we were using at the time was this outdated shell script. It worked fine up until we were monitoring lots of urls. If one of those urls took too long to load, it caused the entire plugin to timeout. This sort of timeout would lead to a slew of warning/critical emails from Munin. Oh, and it also only loaded just the html, none of the additional resources a normal browser would grab. To address this I rewrote most of this script in Ruby to handle checking many different virtual hosts/urls on a single server. This was a fun exercise in threading, daemons, and a nice refresher on Ruby development. Read More…

How to Fix Caching for Views With Exposed Filters in Drupal 7

One of the better features of the views module in Drupal is the ability to cache your view's output. This can come in handy when your view is doing a lot of computation. Caching your view will save your server a lot of unneeded work. One of the big current drawbacks of this feature is if you enable caching for your view and you have an exposed filter, you'll run into the following scenario: User A enters a value for the filter Read More…

Drupal 6 Tutorial: Creating a YouTube Video Gallery

Creating a gallery of your YouTube videos that you can filter by various tags is a trivial task in Drupal 6. Here's an overview of the steps you need to take to add a video gallery to your Drupal 6 site: Create a video content type Populate it with proper fields Create a view to display these video Create a few template files to help display your videos in a nice fashion Make a small module to handle the JavaScript to create the YouTube player Check out a demo of this sweet gallery on the infocus website! Let's get to the nitty gritty of setting up this gallery. Read More…

10 comments.

Another reason why developing for Drupal is more welcoming than WordPress

I think we've all heard a few things about how Drupal and WordPress compare to each other. One thing I haven't heard much about is the "please contribute, here's how" factor to Drupal and its modules and the lack of it in the WordPress community. This can be seen in the site for Drupal modules and the site hosting WordPress modules. Read More…

Using the Drupal Batch API

Recently I was working on a site for a library that had a lot of data that needed to be imported into Drupal as nodes. Each book title, e-book, DVD, etc. needed to be a node inside of their Drupal 7 website. Not only that, but the database that held this data would add new records and occasionally update and remove existing ones. This meant about 300,000 - 400,000 nodes that had to be created and kept synchronized with their internal database. In this post I'll outline how I made use of Drush and the batch API to import the dataset into Drupal from a terminal. Read More…

Pitfalls to look out for when writing a canvas game for Android devices

Recently a client approached Metal Toad to develop a prototype game for Android devices and leaving the option of porting it to other devices open. We decided to develop the game using HTML5's canvas element and wrap it in phonegap to bring it to Android devices. In this post I'll talk about the major pitfalls I encountered while working on the project and provide you with some points to keep in mind while developing canvas games for mobile devices. Read More…

Pages