Shane Graham

Shane Graham

Shane Graham is a senior Drupal developer and co-founder of Deck Fifty Design.

With 15 years experience building open source web applications, Shane has a great eye for detail. He has built hundreds of websites and knows how to speak to clients in plain English. He is proficient in Drupal and has taught college-level classes on Open Source Software. Shane enjoys creating custom Drupal modules for his clients, offering unique functionality and providing the most efficient code-centric solution. The user experience is at the forefront of all his decisions - allowing the content manager a cohesive experience while editing content and providing a natural flow for end-users. When he's not hunched over a keyboard, you can find Shane gardening in the backyard or fishing at the nearest lake.

Blog posts

Drupal Form API - Using Ajax

I love Drupal's Form API. In just about every project we are either modifying or creating custom forms and thankfully, Drupal's Form API makes executing these tasks a fairly easy process. Everybody loves Ajax so in this tutorial we'll combine these two bits of awesomeness to produce some custom 'ajaxified' forms.

Lets start out with a hook_menu so we have a nice page for our example form. You'll see the "page callback" is the function "drupal_get_form" and our "page argument" is our function that will simply return our associative array.

CSS border-box

The typical CSS "box model" (also known as content-box) will produce something like this:

width + padding + border = total/visible width of box
height + padding + border = total/visible height of box

Lets look at the example div below, with the typical box-sizing: content-box.

Exporting Drupal Views to code

Ever been is a situation where you have a crazy complex View and realize you messed it up right AFTER you hit the save button? It's happened to all of us at one point or another. Having the ability to easily revert your View at anytime can be a life saver. This is why we always use the methods below when building larger Views. There are some other substantial benefits to keeping your Views in code. It allows you to commit to your version control system and makes deploying Views from a development environment to a production site a snap. Did I convince you yet?

Custom Drupal Search Block

Recently a client wanted an unusual block. The block contained three social media links (facebook, twitter and youtube) and the search form. The easy solution would be with a static block or block menu and position it with css, but I wanted all the markup in a single block...ok here we go!

Custom Drupal Search Block - Step 1.
First create a custom module. This will require an .info file and .module file. My module is called deckfifty:

My file contains:

name = deckfifty custom
description = " custom"
core = 6.x

Drupal Ubercart exporting orders in CSV or XLS (Excel Format)

Often times clients request a listing of detailed information from their Ubercart orders. Typically the standard Ubercart reports doesn't cut the mustard. Having reports in an exportable format like .xls or .csv allows easy importing into other applications. We'll cover how to create a table listing of your ubercart orders and how to export them.

This tutorial covers Drupal 6 modules. You'll need: