Documentation

CSS with rhythm

I'm still digesting all the cool things I came across at SXSW. The last day I was there I went to a panel called Web Typography Sucks put on by Richard Rutter and Mark Boulton. I walked out with main points from their presentation:

I wanted to try formatting this site using a vertical rhythm but quickly got frustrated with doing all the math. Being a programmer I decided to just put together a tool to create CSS with vertical rhythm.

Installing PHP 5 on Windows

This page provides instructions for a Drupal developer who'd like to install PHP 5 on their desktop computer. The instructions assume that you're running a recent version of Windows (NT, 2000, XP, or 2003). Older version like Windows 95, 98 and Me will not be addressed.

Installing MySQL Server on Windows

Download

The first step is to download the MySQL Server "Windows Essentials" binaries from the MySQL website at http://dev.mysql.com/downloads/mysql/. At the time this was written last updated, 5.1.46 was the latest, stable release. The file was named: mysql-essential-5.1.46-win32.msi. Make sure you save the file to a location on your hard drive where you can locate it.

Installing Apache 2 on Windows

Download

The first step is to download the "Win32 Binary (MSI Installer)" from the Apache Software Foundation's website at http://httpd.apache.org/download.cgi. At the time this was written last updated, 2.2.15 was the latest, stable release. The file was named: apache_2.2.15-win32-x86-no_ssl.msi. Make sure you save the file to a location on your hard drive where you can locate it.

Running multiple versions of Drupal on Windows

Once you've been developing Drupal modules for any length of time you find that you need to test code on multiple versions of Drupal. The easiest way to do this is have separate Drupal releases running as virtual hosts. In this guide I'll walk though setting up Apache virtual hosts for Drupal 5 and Drupal HEAD. I'm assuming you're running Windows 2000 or greater and that you've already gotten Apache, MySQL and PHP setup and running on your local machine.

Windows based Drupal Development

With the aim of helping new Drupal developers get setup on Windows, I've created the following guides.

Unit Tests

Phlickr ships with a set of unit tests to verify its functionality. The unit tests are divided into two separate suites, offline and online. The unit tests are written using PHPUnit2.

On UNIX systems you'll need to be case sensitive, on Windows everything gets forced to lowercase.

Contribue to Phlickr

Phlickr is released under the LGPL license. Contributions, corrections, and suggestions are always welcome.

Notes for developers:

Contributors

Thanks to all of the following people who helped improve Phlickr:
Code

  • Kevin Davis

Ideas and feedback

  • Rob Kunkle
  • François Proulx

Tools built with Phlickr

These are some tools I've written with Phlickr:

  • FavoriteDesktop downloads a random photo from your favorites list, converts it to a Windows bitmap (using ImageMagick's convert tool) and then sets it as your desktop background image.
  • PhlickrUploader is my personal script for uploading a directory full of photos, assigning tags and putting them into photosets.
  • GetToken will help you retrieve an authorization token for a given API key/secret.

Enabling PHP Modules

Phlickr uses two several of PHP5's extensions, CURL and SimpleXML. In some cases these two extensions may not be enabled by default.

The first step is verify that the modules are not already being loaded. You view a list of the modules using the following command:

Phlickr Installation

Phlickr is released as a PEAR package which you can download from SourceForge.

Prerequisites

Make sure that you are running PHP version 5. You can check the version using the following command:

$ php -v
PHP 5.0.4 (cli) (built: Mar 31 2005 02:45:48)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.4-dev, Copyright (c) 1998-2004 Zend Technologies

Downloading Democracy Now! automatically

Here's a PHP script I wrote for the radio station to download each day's copy of Democracy Now!. This requires that the PHP cURL extension be installed.

Moving CCK description field into the node body

Back in Drupal 4.7 if you were using CCK for nodes the node body was left empty. In Drupal 5 CCK nodes now can have a body. I wanted to move data from a field named description into the node body so I came up with the following snippet fit for running in the devel module's execute PHP block.

Syndicate content