Tech

En till Good Old Blogs webbplats

Utbildning 5 oktober: Introduktion till Git

Den 5 oktober kommer vi att hålla en mindre introduktionskurs till det distribuerade versionshanteringssystemet Git som bl.a. populariserats av GitHub och som Drupal nu håller på att flytta till. Kursen riktar sig till de webbutvecklare som är nyfikna på systemet, men inte riktigt fått grepp om hur det fungerar ännu. Det blir jag, Pelle Wessman,…

Läs mer

First alpha of OAuth Connector released

A module I’ve been working on for a while is OAuth Connector – a module that enables a Drupal site to easily let their users log in through OAuth API:s like Twitter’s. A short screencast of how it works: Over a year ago we needed Facebook Connect for one of our projects. Looking at the…

Läs mer

The license issue with embeddable content

A debate has recently been going on in the swedish blogosphere regarding one of the newspapers in southern Sweden’s decision to embed a Flickr slideshow of the latest photos from Haiti in one of their articles. The slideshow included all kinds of images – both creative commons licensed and others – which some people in…

Läs mer

On the uselessness of array_merge_recursive()

I guess that most people have run afoul of the monstrosity that is array_merge_recursive(). In short a merge of array(‘a’=>2, ‘b’=>3) and array(‘b’=>4) gives you array(‘a’=>2,’b’=>array(3,4)) which isn’t the result that one would expect. So, as usual, I’ve created a gist that outlines the problem and gives a more sensible alternative. http://gist.github.com/271920

Läs mer

Talk on Services at Drupalcamp Stockholm 2009

I just held a presentation about services and my plans for services 3.x at Drupalcamp in Stockholm. Everything went well except that I was so nervous about running out of time that I teared through the presentation in 20 minutes. But here are the slides if you missed something. Check out the english version over…

Läs mer

A future for Services – 3.x?

Services is a module that makes it easy to provide web services using Drupal. What services doesn’t do is to allow the definition of separate API:s. This is something we need to fix if we want to turn services into a real web-service framework. Consider the following: Today all installed services are always available on…

Läs mer

Co-Maintainers Wanted!

The list of modules that I maintain has become quite long, and in the beginning of next year I’ll have a little daughter (if the nurse guessed right on the gender). So the time that I have for being a good maintainer will be very limited. If you feel that you’d like to help maintain…

Läs mer

Copying Ubuntu VM:s and eth0

Note to self: when copying virtual Ubuntu servers between machines the MAC address will be changed and a eth1 device will be added with the new MAC address. But it won’t be properly configured. Edit `/etc/udev/rules.d/70-persistent-net.rules` and remove the old `eth0` device and rename the `eth1` device to `eth0`. Then reboot and everything should be…

Läs mer

Dynamic vhost configuration

I’ve recently tried out a new way define my virtual hosts on my development machine. I’ve always had a configuration file in my home dir (that gets included from httpd.conf) that looks something like this: NameVirtualHost *:80 ServerName drupal.local DocumentRoot /Users/hugowett/Sites/drupal/public_html AllowOverride All Order deny,allow Allow from all <VirtualHost *:80> ServerName somesite.local DocumentRoot /Users/hugowett/Sites/somesite/public_html <Directory…

Läs mer

Ensuring that values are in an array

I’ve run across situations where I want to ensure that some values exist in a non-associative array (without getting duplicates). The way I’ve usually solved it is: if (!in_array(‘nid’, $fields)) { $fields[] = ‘nid’; } if (!in_array(‘title’, $fields)) { $fields[] = ‘title’; } This is kind of ugly, and the more values you want to…

Läs mer