WordPress Mu spammed, Chickenfoot to the rescue

I found out last night that I had forgotten to turn off new blog registration on my WordPress Mu instance and that over 500 spammers had created new blogs on my site.  The admin interface allows you to bulk delete blogs but requires that you check the checkbox next to each blog to select it for deletion.  This was getting pretty tedious.  Though I’m sure I could have delved into the internals of WordPress and figured out how to delete these blogs at the database level, this was a little scary and I didn’t really want to spend the time to do the research necessary to feel confident about this method.

So, I installed the Chickenfoot Firefox extension and wrote this simple script that would check every checkbox on the administration page.  This was made easy because of the fact that the only checkboxes on this particular page were ones associated with blogs that I wanted to delete.  This reduced the number of clicks to delete blogs significantly and it only took me a few minutes of manual clicking to delete the hundreds of spam blogs.

for (chk = find(new XPath("//input[@type='checkbox']")); chk.hasMatch; chk = chk.next) {
  check(chk);
}

Photo by loveï½¥janine via Flickr.

webserver_auth module for Drupal 5

I’ve been playing around with Drupal for work and wanted to use mod_auth_kerb to authenticate Drupal users. The Webserver Auth module seemed helpful, but only worked in Drupal 4. I got the module working with Drupal 5.5 running on Apache 2.2.3 using mod_auth_kerb 5.1.

Link to my patch to make webserver_auth-4.7.x-1.x-dev work with Drupal 5.x
Link to documentation  on updating  Drupal 4.7 modules to Drupal 5.

profile_export drupal module

Helping out with the AMC website, I threw together a quick Drupal 4.7 module (haven’t tested it on newer version of Drupal yet) to export user profile data generated by the profile module to a CSV file suitable for import into a spreadsheet program.

UPDATE: After searching the Drupal website, I realized that someone had already invented this wheel.

Link

half.com quick sell mycroft plugin

So Pages to Prisoners sells books that seem somewhat valuable and probably won’t get requested by folks in prison on Half.com as a fundraiser.  All proceeds go into supplies and postage for the project.  We get a lot of books sometimes, and I wanted to streamline the price lookup process.  So, I made a MyCroft plugin for Half.com’s quick sell form.  You can install the extension here.

my first firefox extension! a NATO phonetics converter

My paid job is doing tech-support work and I often have to convey information to users over the phone.  To make sure we’re on the same page with spellings, I use the NATO phonetic alphabet.  But, I can never remember certain letters.  One solution would be to just remember the NATO alphabet.  Or, I could just write a Firefox extension that lets you select text, click on “Show NATO Phonetics” in the context menu, and get a popup of the phonetics for the selected text.

Install the plugin