You are here


Extending the entity registration module

Submitted by nicolas on Tue, 11/12/2013 - 17:23

Entity registration module

The Entity Registration module is a nice module for allowing and tracking user registrations on any entity. It even has some nice extras: you can restrict the number of people that can sign up, integrate with drupal commerce for fee-based signups,...

Extra requirements

As part of a project I was asked to deliver an event signup system. A lot of the functionality was already provided by the entity registration module, but some parts were missing:

Blog category:


Little Bobby Tables

Submitted by nicolas on Fri, 11/09/2012 - 10:44

Today I stumbled across a comic, I saw before and that still made me laugh. It's one of those great XKCD jokes:

XKCD - Little Bobby Tables

It also reminded me of the drupal security book "Cracking Drupal"

So the thought of today: please write secure code. Do this by taking advantage of the Drupal API, and be sure to sanitize your database inputs.

Blog category:


Connecting drupal to MS SQL Server

Submitted by nicolas on Sat, 07/14/2012 - 16:55


While working for a client I needed to make a connection to Microsoft SQL Server. After investigating I found out there are two options: connecting with a PDO driver (only possible on the windows platform for now) or via an ODBC connection. Today I would like to explain the first option, as I needed some time to find out how to do it and combine all the small pieces.

Blog category:


Fields: delete an instance of a field

Submitted by nicolas on Sun, 10/02/2011 - 14:27

When working on a site, there was a feature that enabled a new content type with certain fields. Apparently there was no need for a body field on the content type. I recreated the feature, but when deploying this feature, it will not remove the body field, as this could mean a loss of data.

I had to make use of hook_update to remove the field. Since it was a drupal 7 site, this means using the Field API. But in order to do this programmatically, you first need to understand the terminology.

Blog category:


Custom feeds: an update

Submitted by nicolas on Tue, 04/19/2011 - 15:52

I suppose you read my blog post on custom RSS feeds. I wanted to give a small update, as the solution described there was not sufficient. In the end I needed to output an XML file and every item had to be in the same format. As I was outputting the last node for three different content types, I needed to do some custom coding. The node_feed function was not the ideal solution.

I ended up making my own node_feed function. Here's the code:

Blog category:


Custom RSS feeds

Submitted by nicolas on Thu, 03/31/2011 - 16:04

For a client I needed to make an RSS feed with the latest item of three content types. The feed needed to contain three items: one for each of the three chosen content types.

I was first thinking about using views, to make a selection and then make a feed display. But it's impossible to make union queries in views 2. I was able to make a display containing the three content types, limiting it to three items and sort the list on post date descending. But that didn't guarantee me to have an item for each content type.

Blog category:



Subscribe to RSS - Drupal