Some Helpful "Utility" Drush Commands

Here at Redfin we've come up with a couple of helpful Drush commands that help us with our everyday workflows. The first shows a database string as a URI for Drush aliases, and the second reverts all views that are in an overridden state without any prompting or confirmation.

Tax on Drupal Development in Massachusetts

If you provide Drupal development services in Massachusetts, you may need to start taxing your clients. No, seriously -- this is our attempt to understand the new Massachusetts "Sales and Use Tax on Computer and Software Services" law, which was conveniently released on July 25th 2013 and went into effect on July 31st, 2013.

Design 4 Drupal 2013: Design.

This past weekend marked a turning point for the relatively young Design 4 Drupal (D4D) camp. Over the past several years, D4D has suffered from an identity crisis as it attempted to grow attendance from a (seemingly) developer-heavy pool of Drupal enthusiasts. Boston's lack of an existing camp gave developers little choice if they wanted to satisfy their desire to meet up with others in the Drupal community.

Introduction to Series of Posts on Colour.

The idea for this series of posts started at lunch one day when I made an off-hand comment about reading Hex numbers and making fast changes in my CSS file. I am somewhat new to developing for Drupal, but amid all the new information and terminology was something familiar, colour-space*. A sword that I understood how to put to use in elegant arcs within the rest of the coding I was learning.

Hide “Page Title” quickly using Display Suite in Drupal 7

This is something that is so simple to do, once you have figured out the steps to get to the right little click boxes to appear. I wish that it were more intuitive to find, but for all those who struggle with “hiding” the page titles, Display Suite makes it really easy to choose to hide the page title for a specific Content Type or for a particular Node.

Follow these steps:

Sanitizing Drupal's default $tabs

I am constantly re-working Drupal's tabs to look a little bit more like a pile of bricks, and I've finally decided to stop reinventing the wheel and to document the CSS that makes them display more sanely. (Namely, if you have a narrow main column and a lot of tabs, they start disappearing into the ether over at the right).

I hope this snippet helps some other folks, too.

This fixes your default Drupal tabs by taking it from this:

Easy Image Captions in Drupal 7

For some reason I have a huge mental block when it comes to image captions. I can never quite remember exactly which combination of modules I prefer. Part of this is because I've tried so many different modules that offer this functionality. Also, they all have similar names, such as Image caption, Caption filter, and Image caption formatter.

Drupal Mixed-Mode SSL Behind an Nginx Reverse Proxy

We were having a situation with a site where sessions weren’t being shared between insecure (http) and secure (https / SSL). The one major difference with this site was that we were using Nginx as a reverse proxy, but we weren’t quite sure how it was affecting us. We ultimately found the cause to be a combination of Nginx settings and how Drupal differentiates between different domains.

Announcing the CashNET module for Ubercart 6.x

Redfin is pleased to announce the 1.0 release of the uc_cashnet module, a payment processor for Drupal's Ubercart 6.x that integrates with their external payment service, similar to 2Checkout.

Any feedback is welcome at this point, and we'd welcome the opportunity to further develop this module and create a similar module for Drupal Commerce / 7.x.


Redfin Solutions in IT World Magazine: The CMS Shootout

Redfin Solutions was recently quoted in an IT World article: "Joomla vs. Drupal: An open source CMS shootout," by Daniel P. Dern of Newton Center, MA.

The article is a shootout primarily between Joomla and Drupal. In sum, the article comes to the conclusion (granted this is our particular takeaway from the article) that Joomla is a great "starter CMS" and is geared more for designers and those who need to get a simple site up quickly.

Stashing stuff in $_SESSION in your form's _submit handler in Drupal

Today I was trying to figure out why in the name of all that good in the world why I couldn't use $_SESSION in my form's _submit handler.

As it turns out, I actually CAN put stuff into $_SESSION, it's just that when you want to pull something OUT of $_SESSION later, that's not where it is.

Instead, it's on the $user object in Drupal, in $user->session. After some studying, it seems this is a pipe-delimited and semi-colon delimited list of variable names and their serialized values.

Here's a function to pull stuff off of $user->session:


Views "rewrite output" and you wish you had PHP? Don't always resort to customfield!

First of all, let me tell you how much I love and appreciate the Views_Customfield module, which lets you (among other things), write PHP to print out a field using views. When I need to, I can do some complex conditional-writing based on two other views fields, or I can do things like calculate a thumbnail for a photo gallery based on grabbing some fields using a raw db_query that aren't available through views, and other such craziness (note: be wary of doing this it can kill your site performance!).

Show / Hide Fields In A Views-Generated Drupal RSS Feed

If you want to modify the fields included in a RSS feed generated by the Views 2 module, you have a few options including themeing the view, but the easiest way to simply show or hide certain fields and/or their labels is to simply go to the "RSS" tab when editing a content type's "Display Fields" settings. That's it. Below, I set a couple fields to not be included in my RSS feed since I didn't want, for example, the image name from showing up in the feed.

Format Drupal Calendar Module Mini Calendar Title View/Block

Theming the Date and Calendar modules can sometimes be a little tricky. I wanted to change the title display for a "mini" calendar in a block from "Month" to "Month YYYY" (e.g., "October 2010"). In order to do this you need to first learn how to override a theme function.

Now that you're up to par on theme overrides, we can override this theme function: /modules/date/theme/ theme_date_nav_title. You'll have something that looks like this in Drupal 6.x.