Alfred’s Notes: Drupal

I’ve started studying Drupal, the open source content management system (CMS). I’ll use this page to gather interesting links to documentation and articles on the subject. Who knows? I may even sort and organize them some day.

Ajax in Drupal using jQuery

Introduction to AHAH Forms in Drupal (handbook)

Creating Drupal style tables

AHAH in Drupal: may it one day live up to its acronym

Using default views in your module
Where to put your exported Views in code, direct from Earl Miles, aka merlinofchaos, author of Views, among other essential parts of Drupal.

Describing tables to Views
To someone who already knows SQL, and is very comfortable with it, Views is like trying to fiddle with very small dials while wearing large mitts of cotton batting. The main problem is Views doesn’t necessarily know the ins and outs of your data model. Here’s how to tell Views about those ins and outs. And remove at least some of the batting.

Android Startup Kit

My friend Ian just purchased a Nexus S phone from Wind Mobile. So I thought I’d put together a list of useful apps to get him started on the joy of Android.

There are thousands of apps for the Android platform; so, as if it needed to be said, this is just a personal compilation of apps I find useful and/or fun. I hope you’ll find in it, one or two apps you didn’t know about before, which you decide you can’t live without.

Oh yeah, also should note that these are all free. Continue reading

Remembrance Day at the Canadian Air and Space Museum

A few weeks ago I heard that the Canadian Air and Space Museum was embattled, under attack from its landlord, Parc Downsview Park.

David Soknacki, Chair of the Downsview Park Board of Directors has pulled every dirty trick in the book to evict the museum from its current home, the former de Havilland plant, where Tiger Moths and other gems of aviation history were first designed and built. Among his underhanded shenanigans, Soknacki has refused to recognize the historical and heritage significance of the building. Continue reading

Updating WordPress Plugins Locally, Without FTP

It’s been the bane of my WordPress life: every time I get a notification of updates available on my local installation (on my MacBook Pro), either for the WordPress core, or one of my installed plugins, I get a request for FTP parameters. This, I’ve learned, is due to WordPress trying to write a small test file to the wp-content directory. When it fails, it reverts to trying to get the files via FTP. But, sadly, I don’t have FTP setup on my local install. Besides, from what I hear, this method seldom works.

Don’t despair, though: there is a solution. And it’s fairly simple. (Don’t be put off if you’re not familiar with the OSX Terminal: it’s not that complicated. Really.) Continue reading

Importing a Distribution List in Outlook

So I had to send out a notice to about 700 users. I had the list in the users table of my app’s database. I wanted to create a distribution list in Outlook. It’s not as straightfoward as it may sound.

The first step is to generate the csv file. Small complication: although I had access to the database, I did not have access to the server. So any output files MySQL generates are essentially out of my reach. Therefore, I needed to generate the file locally. No problem: MySQL has an –execute option which allows you to run multiple commands from the command line. It gets long and unwieldy, but it works. Here’s what I used:

mysql -u root -p db01 ^
  -e "select distinct concat(first_name, ' ', last_name, ', ', email) as name from users order by last_name, first_name;" ^
  >users_list.csv

(Yes, you can use the caret to continue a command on the next line. But don’t use a tab to indent your continuation. Spaces are cool though.)

OK, step one done.

Step two is creating a new distribution list in Outlook. You do that under Contacts. Click Select Members, to bring up a dialog box.

See the Members-> button near the bottom? The text field next to it is where you can paste your extracted list. (Now might be a good time to send a shout out to the morons who architected this brilliant bit of user experience. On behalf of users everywhere, I entreat you to find another line of work.)

This is great, but there is a caveat. As I said, my list was about 700 users long. Outlook wouldn’t accept that many records in a single DL: it came back with an error message. So I tried 200. Still no go. It did take 100. So I created 7 separate distribution lists, then one more to rule them all. The last distribution list contained the other 7, so I can just send my email to the one DL.

That’s all I have for now on distribution lists in Outlook. Hope this is useful.

When WordPress Goes Wrong

This past weekend I finally sat down to upgrade my WordPress installation. I was at 2.8.4 and heading for 3.1.2. The automatic upgrader wasn’t working (it would start downloading the zip, and freeze), so I had to upgrade manually. (Using the upgrade instructions here.)

But when the dust settled, my admin dashboard was FUBAR. A number of the blocks on the page weren’t appearing. But the worst of it was that I’d select other pages in the admin and would get a 500 Internal Server Error. Yikes! Interestingly, though, the main site was working just fine.
Continue reading