User login

You are here


Drupal 7 adding custom AJAX commands

Sometimes the existing Drupal AJAX Framework commandset isn't quite all you want todo.

Fortunately it's quite simple to add your own

Create your extension to the AJAX prototype - place it in a file 'thing.js' - data from your module will be serialised and sent here


Drupal 7 Anonymous User Sessions

In Drupal 7 anonymous sessions were disabled for performance reasons, there's generally not really any reason why you need or should be tracking anonymous users


But what if you want to do some session handling but don't necessarily need the user to login with a full Drupal account?


Creating and running a Internet Radio Station with Drupal

Recently for fun I setup "TShirtSlayer Radio", designed to let the community members of TShirtSlayer ( who are often also in their own metal bands ) upload their songs to the new radio station.

This had a few key requirements

- They had to use their existing Drupal account to login and upload the songs (mp3/wav/etc)

- The actual internet stream radio station website would be a subsite (

- The subsite had to have some functionality like being able to request a track

Extending Drupal's Honeypot module with log checking

Using some simple bash command like awk and sed, I cooked up this quick drush hack to examine the server logs, there's a specific robot getting around that continuously hits up the "/user/password?name=xyz" URL, this simple line fed script grabs the IP address in the first column, sort's them, counts how many uniq's there are, then uses awk again to only print out IP's that have tried this URL more than 2 times.

Facebook style realtime event notifications in Drupal+Node.JS

Ok so this one is a bit of a hack, but on my TShirtSlayer website it fits very nicely.

Essentially I wanted to do something similar to the way FB does automatic realtime notifications but instead of focusing on people, I wanted the the focus to be on the taxonomy (things added to the site broken down by category), this is our message/event we want to spread to other users.

Tips for testing Drupal Migrate (simpletest)

Recently completed a complex job where there was significant work in lining up exported fields exported with Views data export (CSV) into the excellent migrate module, basically so the operator could export data into excel spreadsheet, adjust and re-migrate

So here's some tips I learnt.

Synchronising comments in Drupal with YouTube playlists

Here's some nice hack to synchronise peoples comments in the forum - that contain youtube links to actual youtube playlists in your account.

For example, this is great on TShirtSlayer because it's a music related website, and people often paste in links to youtube, it's a lot of fun to play a youtube playlist back when it's based on really good discussion on your website

So let's get started, I really prefer to use Drush for these kinds of events, however you could create some kind of queue mechanism from the comment being submitted instead

Drupal webform - I have the worlds laziest progress bar

I've been working on a couple of project's using the greatly improved and very popular Drupal webform module with lots of pagebreaks (pages), unfortunately for these projects some medium level of backwards compatibily is required (damn you old browsers), so here's some cheap and cheerful jQuery to inject a simple Progressbar, I like this method better because it does not require one to customise the node-webform.tpl.php

(note: the following is for Drupal-7 release of webform only)

Site specific CAPTCHA images (or how I learned to beat the 'bot)

Recently, After some massive work upgrading TShirtSlayer from Drupal-5 to Drupal-7 (!) I enabled the Drupal "reCaptcha" and "Captcha" modules, only to discover they are totally and utterly useless, it was almost like they were making it easier for bots to find and get into the site by allowing the bots the right search text to locate the site in the search engines (probably where very carefully crafted software would then go and generate accounts on my site)

HOW TO: Configuring Drupal's Ubercart Bitcoin Payment module

So there's been a bit of noise about better documentation for setting up the Ubercart Bitcoin Payment's module, so you can accept Bitcoin payment's in the equivalent market rates to your existing currencies on your shop. So, I assume that since you have your Ubercart shop setup, you probably got as far as setting up something like the Paypal gateway or whatever, and that you have a functioning existing shop working. Now, onto Bitcoin.


Subscribe to RSS - drupal