Persistant stack class for PHP
Posted by: Mike | Filed under: drupal, php, sqlite
I made a simple class that provides a simple SQLite-based persistant FIFO stack class for PHP 5 (similar conceptually to Stack::Persistent in Perl).
A number of times I've written Drupal scripts that run out of memory while trying to process large amounts of nodes (changing taxonomy, etc.). Adding them to a persistant stack, then doing them in batches, is an easy way to remedy this.
Example usage:
Theme a Drupal node using a suggested template
Posted by: Mike
Drupal offers lots of template overriding possibilities via giving templates names that correspond to a node's path, ID, etc. but there's no "official" way to get Drupal to use a special-case template.
Straight.com Case Study
Posted by: Mike | Filed under: drupal
A case study of the migration to Drupal of Straight.com is now on the Drupal.org front page.
Drupal on Ubuntu Snags
Posted by: Mike | Filed under: drupal, ubuntu
I ran into some snags while trying to use Ubuntu for offline Drupal development and have noted them down for future reference.
After getting LAMP installed, I added "AllowOverride All" to the necessary directories in the Apache config, but Drupal clean URLs wouldn't work. It turns out that, unlike Centos, Ubuntu doesn't enable mod_rewrite on Apache by default. The solution was enterning "sudo a2enmod rewrite".
Folks are using Multiforms... Yay!
Posted by: Mike | Filed under: drupal, multiforms
According to Drupal usage stats, over 40 sites are using the Multiforms survey/contest module I developed with the help of Geoff Burke and Miles Kier. That's not a huge number, but will motivate me to clean up the code and improve the documentation. I've definitely learned a lot about Drupal, and development in general, since I started the project a year and a half ago.
Javascript Syntax Checking From Vim
Posted by: Mike | Filed under: javascript, vim
Syntax checking from vim is handy. By checking your Javascript syntax from vim, rather than the browser, you'll save time and aggravation. To do it, you'll need Spidermonkey, which allows you to run Javascript without a browser, and JsLint, a Javascript syntax-checker writter in Javascript.
Installing Spidermonkey
Consult the build instructions page for installation instructions for many architectures, or use the quick instructions below for Ubuntu and Centos.
Using Django's Databrowse With Inspectdb
Posted by: Mike | Filed under: databrowse, django, drupal
The Django databrowse application is an interesting piece of software that I've wanted to try out ever since its creator, Adrian Holovaty, demoed it in Vancouver last year. Its purpose is to allow you to navigate data, using a web interface, looking for trends and other interesting aspects.
Vancouver Django Meetup
Posted by: Mike | Filed under: django, vancouver
The first monthly meeting of the new Vancouver Django group took place today. Good times and Django lore abounded. Want to come to the next one? Check out the Meetup page.
Centos LAMP Restart Script
Posted by: Mike | Filed under: centos, drupal, lamp, linux