13
Jan
2012
Grayside

Release: Organic Groups 6.x-2.2

I have just tagged the first OG6 release since March of 2010.

We have a fine assortment of changes (see the changelog), ranging across:

  • New Hook API Documentation
  • Views integration improvements
  • Localization improvements
  • Miscellaneous areas of moderate interest

This release locks in some changes, clarifies the status of Notifications (sticking with the 2.x line for now), and sets up OG6 for a stable position to start looking at what should happen next. I’ve posted a sort of maintainer’s philosophy position on how I see OG6 moving forward, you can read it at the d.g.o address of Organic Groups. What does all that translate into for my next steps?

Well, aside from a few clear cases, it’s still very much up to the community. I’m going to focus on a few good patches, and see if I can help the groups.drupal.org-related issues, performance, and the Weirdness subqueues. I’m hoping to have enough cool stuff pulled together to release 2.3 in honor of Drupalcon Denver.

24
Aug
2011
Grayside

Infinite Null: Sorting NULL to Last

Please, keep in mind this post was written for Drupal 6 and Views 2! D7/Views 3 sites might not take so kindly to it.

Recently I was looking at creating a new Todo Feature with a due date. I cracked open CCK’s manage fields UI and added a date field, careful to keep in mind that the default value should be no date, which just happens to translate as NULL. You see, for my Todo use case, not all Todos would have a deadline.

My next step was to create a View of all upcoming items. I wanted the next most urgent todo to float to the top of the list. Sadly, NULL counts as 0 in database land, so my carefully clicked Sort was preloading all my urgent todos with all the lowest priority tasks.

Seeing as this was a SQL problem, I googled the ‘net for viable query tweaks. I found a nice article illustrating exactly what I wanted: MySQL Sort Order with NULL. The grand secret? Sort first by whether the duedate is NULL to flip your empty values to the bottom of the result set.

Read on to see how I added this change to my View.

19
Aug
2011
Grayside

Configure Drush in Your Git Repository

One of the neat features of Drush is it’s configurability. Setting the defaults for various behaviors and command options allows you to build really simplified, specialized workflows. You can create personal settings defaults by dropping a `drushrc.php` file in one of the places Drush will look, such as inside a .drush folder of your home directory.