Tech

En till Good Old Blogs webbplats

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

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

Convenience scripts for Solr

This is a set of convenience scripts for daily drupal use of solr in a dev environment. When you use the apachesolr module in many projects it becomes somewhat boring to set up solr again and again. And when you have a whole team doing the same thing, this script becomes a time-saver. This little…

Läs mer

Caching the results of your functions

Sometimes when you use info-hooks to collect information from a arbitrary number of modules, or perform some other expensive or ”unknown cost” operation, you’ll start to feel the need to cache your results. If your function will be called several times during one request caching in a static variable will take off some of the…

Läs mer

Code with style

Throwing in a quick tip about two TextMate themes that many of us at Good Old use. NeoPro: NeoPro Inverted: The inverted theme was created using this snippet and some additional contrast tweaking. You can find the themes and some font tips at GitHub

Läs mer

How to integrate a iPhone application with Drupal

Note: This blog post haven’t been updated in a while, but the code and database dump has. If you’ve learned a lot (or enough) from this post and want to give back to others in the Drupal and iPhone dev community you can fork the blog-post on github and update it. The blog post is…

Läs mer

New Drupal module for DRY CSS

I’ve created a new Drupal module, cssdry, for writing DRY (don’t repeat yourself) CSS. The module leverages a CSSProcessor class written by Allain Lalonde, with some alterations to support CSS2 attribute selector and relative url rewriting. The easiest way to demonstrate it’s functionality is by example. So here we go.

Läs mer