Skip to main content
Joachim's blog

Main navigation

  • Home
  • About

Breadcrumb

  1. Home

drupal planet

By joachim, Wed, 23/11/2011 - 13:20

A concept for limiting taxonomy terms by common fields

There are several modules that provide taxonomy term widgets that are more efficient at drilling down into large and complex vocabularies of terms, but I've not yet found something that just limits terms in some way.

The use case is somewhat like this: I have products that are classified by sport and by team. And teams can be rugby teams or football teams, and so on. Having one vocabulary per type of team feels somewhat weak, but putting them all in one vocabulary means the user has to wade through a lot of irrelevant terms.

Tags

  • drupal
  • drupal planet
  • taxonomy
  • javascript
  • ajax
By joachim, Fri, 28/10/2011 - 08:52

Dynamically changing Views table joins

I've recently had cause to make Views make joins to tables in peculiar ways. Here's some notes on the peculiar things I did with the views_join class to accomplish that.

First of all I'll briefly recap how we define a table to Views. Each item in the $data array returned to hook_view_data() represents all the information about a table. Each key in the array is a field on that table (well, or pseudofield), except for the 'table' key which has the basic data about our table, like this:

Tags

  • drupal
  • views
  • drupal commerce
  • drupal crm
  • drupal planet
By joachim, Sun, 17/10/2010 - 16:13

It's Amazing What You Find: Crusty Bits of the Menu System

I've been poking in the innards of the menu system the last few days. This is due to yet another client wanting to do something that goes completely against the grain of Drupal.

Tags

  • drupal
  • drupal planet
  • drupal 7
  • menu system
By joachim, Wed, 30/06/2010 - 15:59

The Oxford Comma

Here's a little function I wrote today because I needed to be able to turn a list of between one and three items into a string like 'apples, oranges, and pears', 'apples and pears', or just 'stairs'.

I figured I might as well handle everything in one place, and throw in the option to have an 'or' instead of an 'and'. There may be occasions you don't want the Oxford comma, but I can't think of any.


/**

Tags

  • drupal
  • php
  • theming
  • drupal planet
  • text
By joachim, Wed, 30/06/2010 - 14:19

Using Constants For Permission Names: WHY?

I keep seeing this sort of thing in so many modules:

define("MY_MODULE_PERM_ACCESS_WIDGETS", 'access widgets');
// Names changed to protect the guilty ;)

Am I missing something, or is this utterly pointless?

Tags

  • drupal
  • code style
  • drupal planet
  • wtf
By joachim, Tue, 06/04/2010 - 14:06

Once & Only Once: The Conversion To Drupal 7's FieldAPI

I'm not a fan of repeating myself, or of doing the same work twice. So when I first got a look at FieldAPI back at DrupalCon Paris, my thought after 'Wow this is going to change everything,' was 'Every module that converts its custom data storage to this is going to be doing the same work, over and over'.

Tags

  • drupal
  • module
  • 7.x
  • drupal planet
  • fieldapi
By joachim, Sun, 21/03/2010 - 20:57

Help needed: using jQuery to show passwords as you type

Today I found an article about password usability, which suggested that showing users what they type for their passwords is an improvement to usability.

You can try a working demo, which adds a 'show password' checkbox.

This had me wondering whether this is a feature we should consider having in Drupal.

Tags

  • drupal
  • modules
  • drupal planet
  • help needed
  • jquery
  • usability
By joachim, Tue, 16/02/2010 - 17:07

Getting Stuff Done

Basically, an initial patch went in, we opened followup issues for cleanup, the followup issues never got followed up, so what's in HEAD is a bit of a mess. — catch, in a recent issue comment

This happens far too often. I'm not linking to the specific issue in the Drupal 7 queue because I don't want to point fingers; this suffices to exemplify my point.

Tags

  • drupal
  • roadmap
  • drupal planet
  • project management
By joachim, Wed, 10/02/2010 - 23:02

Services, or How I Learned We're All Just Secretly hook_menu()

I am now batting nodes, complete with imagefield, between separate instances of Drupal with merriment and glee. For yes, I do have a working beta of Content distribution.

I'm about to quickly write a service to get CCK's content_fields() array from the remote, distributing site, so that the retrieving site can show a UI of possible values for a Views nodereference argument. Try it. It all makes sense once you do.

Tags

  • drupal
  • 6.x
  • services
  • 7.x
  • drupal planet
  • content distribution
  • abstraction
  • 8.x
By joachim, Thu, 28/01/2010 - 20:51

Why Is Writing Drupal Documentation Harder Than Writing Wikipedia?

I used to write on Wikipedia, years ago when it was a wild frontier, we had barely 30 thousand articles, and not even my geek friends had heard of it from a source other than my blathering on about it.

Tags

  • drupal
  • drupal planet
  • documentation

Pagination

  • Previous page
  • 2
  • Next page
drupal planet

Frequent tags

  • Drupal Code Builder (9)
  • git (7)
  • module builder (6)
  • 6.x (5)
  • drupal commerce (4)
  • development (3)
  • Entity API (3)
  • Field API (3)
  • patching (3)
  • Composer (3)
  • Drush (3)
  • contributing code (2)
  • maintaining projects (2)
  • code style (2)
  • contrib module (2)
  • drupal.org (2)
  • debugging (2)
  • tests (2)
  • multisite (2)
  • issue queue (2)
  • Drupal core (2)
  • core (2)
  • modules (2)
  • roadmap (2)
  • 7.x (2)
  • developer tools (2)
  • Rector (2)
  • wtf (2)
Powered by Drupal