Shane Graham

Shane Graham

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

With 10 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 8 l() function - creating a link

Jan 17 2017 - 5:14pm Content Management System, Drupal, Web Development Comments

The Drupal link function or l() function is a handy function you've likely used many times over the years of development. All the way back to Drupal 4.6 (my first version of Drupal) it's been a standard, something I've used so many times I don't even have to think about it. Its ability to correctly handle aliased paths, add an active class and an optional destination, makes it simple to implement yet very useful in just about any Drupal site.

Drupal Form API & Adding Entity Form Fields

May 22 2013 - 3:23pm Content Management System, Drupal, Web Development Comments

It seems my love for Drupal and its Form API is always expanding, yep, kinda creepy sounding but to a web geek such as myself, it's perfectly normal to love a CMS and its API's!

In building my custom form I required an entity field which is present on user creation. Instead of duplicating the field, grabbing the current value and then saving the new value with an user_save() it's best practice to let Drupal handle the heavy lifting, since we don't want to duplicate tried and tested functionality or have to update the custom field should anything change to the entity field.

Drupal Subscriptions Module - Referenced Nodes

Apr 17 2013 - 7:45pm Content Management System, Drupal, Web Development Comments

The Drupal Subscriptions module notifies users on certain events. Usually when a new piece of content has been either saved or updated. Users can subscribe to specific nodes, terms or entire content types allowing them to keep up with the changes on the site. It's a great module.

Drupal Form API - Conditional Fields

Nov 26 2012 - 12:00pm Content Management System, Drupal, Web Development Comments

In a previous Drupal developer blog post, I discussed leveraging Ajax with Drupal's Form API. In this post we'll cover an alternative method in displaying dynamic content to your user - using Drupal's form states (conditional fields).

Rendering Drupal Views in code

Oct 28 2012 - 4:22pm Content Management System, Drupal, Web Development Comments

Having a query builder like Views at your fingertips is fantastic on so many levels. I'm not going to get into my deep and semi-weird love affair with Views at this point in time, but I will show you how to programmatically display your Views display in code. This can be useful in a custom module, perhaps in a hook_node_view or maybe in one of your node or page templates.

In this example I'll add my View to my blog nodes. I'll just append my View to the bottom of the blog content. We'll want to use the views_embed_view() function to render our desired View display.

Drupal Form API - Using Ajax

Sep 24 2012 - 5:17pm Content Management System, Drupal, Web Development Comments

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

Mar 19 2012 - 7:50am CSS, Web Development Comments

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

Feb 26 2012 - 2:55pm Content Management System, Drupal, Web Development Comments

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

Aug 24 2011 - 9:02pm Content Management System, Drupal, Web Development Comments

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)

Jul 4 2011 - 5:26pm Content Management System, Drupal, Web Development Comments

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:

What our clients say

We had a terrific experience working with Deck Fifty. They redesigned and upgraded our existing Drupal site with a large archive and registered user base. The result not only looks great but performs spectacularly better than our old site, and represents a big improvement in user experience for our mobile readers. They were a pleasure to work with, sensitive to our budget constraints, and delivered exactly what they promised. And it seemed there was never a question that they couldn't answer quickly and knowledgeably.
Thomas Baker - Publisher, Commonweal Magazine

Get in touch

Let's go!

We look forward to hearing from you!