DNotes LLC

DNotes LLC

Drupal development, hosting, and consulting

Recent Blog Entries

Views query alter methods

Views is a fantastic module that allows you to build complex database queries through configuration. However, I've found that a weird variation of the 80/20 rule applies to views: 80% of the time, the configuration will get you 100% of what you want, but 20% of the time, it will only get you 80% of what you want. That's where the views hooks are handy, especially hook_views_query_alter. I've used this many times - adding a where clause, modifying a field, etc.

Object Oriented Rose Bush

$rosie = new RoseBush;
$rosie->plant();
$rosie->shred_flesh();
$rosie->fertilize();
$rosie->weed();
$rosie->water();

Quick and dirty migration to new Aegir platform

I've been trying out the managed Aegir mini offering by Omega8.cc, and been quite happy with it. A few days ago I got a message that I needed to migrate them over to another platform because they weren't on a Pressflow-based Drupal 6 platform. These are sites that I haven't touched for a long time - apparently, in fact, since before I started using Pressflow. So then: how to migrate the sites without spending a lot of time on them? I decided to just move all the code into each site's folder and then migrate. Here's how to do it:

Drupal 7.x usability

My wife just started using a freshly-installed Acquia Drupal 7.2.2 site. She's very web savvy, but not familiar with Drupal. Here are some quotes:


(reading) "'Step 1. Start at the beginning. Visit the administration section for a task-based or module-based overview of the options available to configure your website.' Which one do I want? Task-based or module based? Well, I can't do task based, because the link doesn't work! I guess I'll do module-based. Let's see... Acquia Network - do I want to do that? I don't know what any of these things are...."

Quick add new ticket form block in OpenAtrium case tracker

One of the things that annoys me about all ticket management systems is the amount of time that it takes to add a new ticket. Click the project; click for a new ticket; wait for the page to load; enter a title; select a priority; assign to a user; select other options; enter a longer description; click "Save"; wait for the page to load; rinse and repeat. That's a lot of overhead just for adding a ticket! I've tried unfuddle, basecamp, jira, and openatrium, all with the same complaint.

Nine-pointed star using GIMP with spyrogimp

Ever want to make a nine-pointed star using spyrogimp? Unless you're better at straight math than me, it's a little tough to figure out the numbers. Here are some that work:

A ratio of 7:1 (for example, 84 teeth on the outer wheel, and 12 on the inner) will get you a regular nonagon. For something with a nicer weave to it, try 120 outer and 48 inner. I've found that a hole ratio of about .23 works well on that last one. By varying the settings, combining different figures, applying selective shading, and removing extraneous lines, you can get some really nice figures.

Why is all my CSS gone? ...drush cc

So, there are probably many reasons you might be getting a page like this one, with no CSS whatsoever. I've discovered a few. My most recent surprise was drush cc.

At least in my case, it looks like clearing that "css and js" cache is a bad idea on a site with page caching turned on, because anonymous users will see the WSOC (white screen of confusion - just a little shy of the WSOD).

Pages

Subscribe to Recent Blog Entries