zero dev's blog

16
Jan

Theming blocks in Drupal 6, templates and preprocess functions

zero dev's picture

Background reading

http://www.nicklewis.org/drupal-hackers-cookbook/theming/hook_theme-and-...

Nicks excellent run through is a little bit confusing when it comes to working out whether you're using the verbose or preprocess methods. This walk through is going to use just the preprocess method. We'll create a very simple module that provides a simple login block, or if logged in, a few links through to account, account edit and log out.

13
Jan

Managing custom Drupal modules with git

zero dev's picture

What we're trying to achieve

Say for example you have a lot of custom modules exisiting as git repositories and you want to have a way of managing them for multiple sites. Say for example, something like drush up custom_modules, you sort of can with git submodules. In this way we'd beable to make a commit in one place and easily pull it down into our various sites.

Method

Using git submodules we'll create a repo for the custom modules and use git submodule add to add each module.

23
Aug

Auto serialize arrays through the DB abstraction layer

zero dev's picture

Ever spent for ever serializing and unserializing arrays before storing them in the database in Drupal with all the attendant heart break that involves? Well, you just don't need to.

28
Feb

Speeding up the Drupal batch api

zero dev's picture

(Note - this turns out to be about command line PHP rather than the Batch API)

We were looking at a problem. How to convert 350,000 user profiles, built using the core Drupal Profile module into a tidier single table using a custom module solution?

23
Jan

Drupal 7 re-build

zero dev's picture

Welcome to the new D7 version of the site!

The site wot I upgraded

Over the past few days I've learnt a fair bit about Drupal 7 upgrading this site and upgrading a clients site

19
Dec

Making Drupal cheap

zero dev's picture
Tags: 

I read with interest an article in the register many months ago regarding the cost of government websites, where the conclusion was

What's the lesson? The licensing model of the underlying technology isn't a significant factor in determining website costs. Free and Open Source Software won't matter when a consultancy or outsourcing company loads up a contract with tasks requiring many person weeks of expensive billable time.

Which made me think again about how Drupal can be made cheap.

13
Apr

A day in the life..

zero dev's picture

Working as a contractor you come into contact with a wide range of company 'cultures'. The longer you're there the more likely you are to experience the weird edges that don't marry up with the rebranding exercises.

I've been working at an agency for a couple of months now and I'm coming towards the end of the contract. One of the big things that changed about a month ago was I got a Mac to develop on. What I didn't realise was I also got a new first line technical support dude. Let's call him Algernon, or Algy for short (the names have been changed to protect the guilty).

18
Nov

Admin links dissapear on custom content

zero dev's picture

This is an ugly little hack to get around the fact that those lovely neat Admin module links disappear when you don't print $content in your tpl files. The other method would be to use something like contemplate, or panels to avoid the problem completly.

ok, here is the hack. 1. create a module admin_links:

6
Nov

Drupal: Remove title and breadcrumb from front page

zero dev's picture

When you have a panel or a front page design that does not require a breadcrumb or a title you can either use CSS or Drupal's template_preprocess_page function

By overriding elements of it in template.php in your theme folder you can alter the defaults and change a number of things. It looks like this:

Subscribe to RSS - zero dev's blog