Data Syncing Fun

This happens to be about Drupal sites, but isn’t really Drupal-specific. If you must know, the custom classes I refer to later are Migrate module migration classes, with the JSON source plugin. I’m working on a project (let’s call it Satellite site) that shares data with the Parent site. Content editors on the parent site […]

PHP: Do Objects As Array Values Pass By Ref?

Cliff notes: YES! $class = new StdClass(); $class->alpha = ‘hello’; $foo = array( ‘a’ => 1, ‘b’ => $class, ); function foo($foo) { $foo[‘b’]->alpha = ‘goodbye’; } print_r($foo[‘b’]->alpha); foo($foo); print_r($foo[‘b’]->alpha); $ php foo.php hellogoodbye

Creating a Custom Entity with One to Many Rows

My team is in the middle of a research sprint for moving us from Drupal 6 to 7. As creator/owner of the API, I’ve been looking into what can be done differently in Drupal 7. The first candidate for major changes is how we store API keys; I decided that they were best suited as […]

Drupal: Views 3 Exposed Filters for Multiple Fields

I’m working on a side project with another local dev. This project is in Drupal 7 with Views 3. The purpose of one of the views is to show users stores in a certain city/state. Each store is a node, the address of which is stored in a postal address field from the Address Field […]

Drupal: Fun with Views’ hooks

I’m still working on the site for my artist friend I mentioned in my last post. There are two problems I’m facing, both solved with the creative use of Drupal Views hooks and a patch to Drupal core (yes!).

Drupal: Omega Theme + Submenus

I’m working on a side project for an artist friend of mine. Their current website is in Drupal 6 and a total mess. Whoever built it left a ton of extra modules lying around, code placed in bad locations, no organization, etc. It’s been a nightmare to work on. After doing some quick fixes for […]

Drupal: calling a view programmatically

I have a situation where I needed to call a view programmatically to output its results in a way that Views can’t natively. That’s pretty well documented in the wild, but I had a couple special factors that I needed to account for. Building the View My view needed to get all published nodes of […]

Toilet Seat Logic

Women often complain that men leave the toilet seat up. Men complain that women should just put the seat down when they need it. While I agree with men that women shouldn’t complain about it, here’s my argument for why the seat should always be down. There are three scenarios in the toilet debate: always […]