Environment aware Drupal sites

wiifm's picture
Submitted by wiifm on Mon, 09/29/2014 - 13:28

As a course of developing for larger Drupal sites, you typically find yourself having multiple environments, one for development, one or more for staging or user acceptance testing, and another for production (and perhaps disaster recovery).

One thing that always comes up is making Drupal "environment" aware, so it knows how it should behave, what modules should be turned on (or off) and what servers it should be talking to for instance.

How to create a dashboard with Dashing and integrate with Drupal data

wiifm's picture
Submitted by wiifm on Thu, 07/31/2014 - 23:27

What is Dashing

Dashing is a Sinatra (think ruby but not rails) based framework that lets you build dashboards. It was originally made by the guys at Shopify for displaying custom dashboards on TVs around the office.

Why use Dashing

Dashing makes your life easier, freeing you up to focus on more inportant things - like what data you are looking to display, and what time of widget you want to use.

Features of dashing:

Updating Drupal to use Google Analytics Universal tracking

wiifm's picture
Submitted by wiifm on Tue, 07/01/2014 - 16:58

So Google Analytics has a new version of Google Analytics dubbed "Universal Analytics", which has a bunch of new features, that could be handy for your website. I would dive into exactly what they are here, as you can read about them on Google's own website.

In this post I will go through the steps to upgrade the Google Analytics 7.x-1.x module to the new 7.x-2.x version that supports Universal Analytics.

Upgrading PHP to 5.4 on Ubuntu 12.04 LTS to support Drupal 8

wiifm's picture
Submitted by wiifm on Sat, 03/22/2014 - 17:20

As of the 28 February 2014, Drupal 8 now requires a minimum PHP version of 5.4.2. For background information read the drupal.org issue.

This places everyone running Ubuntu 12.04 LTS in an awkward situation as the PHP version bundled with this release is PHP 5.3.10.

Luckily there are options to solve this:

High performance AJAX callbacks with Drupal 7 and the JS module

wiifm's picture
Submitted by wiifm on Thu, 11/28/2013 - 19:46

As your site grows with the number of modules, the amount of memory and SQL queries required to perform a full bootstrap grows. Even though your AJAX callback might only need to perform a single SQL SELECT query, sometimes Drupal spends a lot of time loading and executing code that will never be used.

SQL injection and Drupal 7 - top 1 of 10 OWASP security risks

wiifm's picture
Submitted by wiifm on Tue, 11/12/2013 - 15:20

As part of the series of blog posts on the top 10 OWASP web application security risks and how to defend against them in Drupal 7, here is the first post in the series. This post deals with the top security hole - classified as "injection".

From the OWASP top 10 security risks:

Error aggregation and alerting with Drupal 7 and Raygun.io

wiifm's picture
Submitted by wiifm on Sun, 11/10/2013 - 19:12

Being able to work out when an issue started occurring an what impact it is having on real people using your site is critical business information that too often gets overlooked.

Existing (core) modules that can help

Drupal core ships with a few modules that go some way as to helping you track down application errors:

Using apache-libcloud to provision cloud servers

thepearson's picture
Submitted by thepearson on Tue, 08/27/2013 - 14:28

Apache's libcloud is a Python library that allows you to write code that interacts with numerous cloud service providers. In this tutorial we'll cover some basics and look at setting up a basic AWS EC2 instance as an example.

Adding additional fields using a custom module in OpenERP 7.

thepearson's picture
Submitted by thepearson on Thu, 08/22/2013 - 21:04

My eyes, the goggles do nothing!

Getting started on OpenERP can be a bit daunting, initially this behemoth can be really painful. However once you get familiar with the system everything is really easy. In this tutorial I'll go through the steps involved in adding an additional field to an existing model and adding it to an existing view. We'll also do this by creating a custom module, so we will also cover some of the basics for doing that as well.

Validate and clean user submitted address data with pygeocoder

thepearson's picture
Submitted by thepearson on Tue, 08/20/2013 - 13:49

Update: The method described here uses Google Maps' Geocoding API. The free version of this only allows 2500 lookups per day, I easily ran into this limit during development. The Google Maps for Business API allows 100k requests per day.

A job I have been doing recently has me regularly importing user submitted postal addresses from a 3rd party website into my clients accounting system. The quality of some of this data is really average. This is mostly due to poor (read zero) validation from the 3rd party website.


Subscribe to Pixelite Magazine RSS
glqxz9283 sfy39587stf02 mnesdcuix8