by pixelpusher on Monday 15 September 2008
[Blog, Software]
I spent a bit of time trying to get lightbox working in Wordpress with the new, built-in image gallery shorcode that is part of wordpress.
First, get Lightbox2 from its plug-in page. Download it, unarchive it, and put the lightbox-2 folder into the plugins folder in your Wordpress installation, and use the Wordpress control panel to activate it, as per the instructions.
I had issues with thumbnails not being auto-generated – there are many solutions in this thread on the Wordpress site, but after making sure that all of my images were standard 24-bit PNG it seemed to work very well.
Then, get my slightly-modified media.php file – what I did was to add the lightbox code to the default photo gallery shortcode function. Rename the file to “media.php” and put it in your wp-includes folder in your wordpress installation. You’ll probably want to keep your old media.php file before you do this – just rename the original one media.php.bak.
For the WP hackers out there, what I did was to simply cut the wp_get_attachment_link function from the file wp-includes/post-template.php and add it to media.php in place of the original function call. then I modified that code to add the lightbox ref=”GALLERY_NAME” property to every image attachment link returned.
Once that is finished, you can upload images via the regular “add media” tool in the editor and display them via the gallery shortcode, and viola! They will be automatically open in a lightbox-enabled slide show.
UPDATE (for WP 2.6.5):
This no longer works, because they’ve changed media.php. The new fix is to edit your wp-includes/media.php file so that starting from line 109 is the following:
//$link = wp_get_attachment_link($id, $size, true);
$pt = str_replace(" ", "_", $pt);
$thumb = wp_get_attachment_image($id,
$size='thumbnail', $icon = false);
$link= "<a href='". wp_get_attachment_url($id) .
"' title='$post_title' rel='lightbox[$pt]'>$thumb</a>";
One Comment
by pixelpusher on Wednesday 6 August 2008
[Blog, Software]

The first rule of blogging is to blog often. So much for that. I’ve been traveling the world, and moving, and generally sans internet (that means “without internet” for all you non-French speakers). In spite of this blog silence, I’ve been working on a lot of new things. Like more experiments and sketches in Pop Art and Processing. Here’s one (source code included):
PopArt 01
One Comment
by pixelpusher on Thursday 5 June 2008
[Blog, Software]
A software art project that remixes the skylines and sights of cities I’ve lived in and visited. Download at: NYLONCityBlob

Awhile back, in 2006, I put my lifelong obsession with New York City’s buildings to good use. 2006 was the year my wife and I moved to London to start a new life as expatriates, reversing the colonial journey that started our home country in favor of the old country on the edge of a new, powerful-again Europe.
Leaving New York, I felt like a traitor. New York is in my family’s blood. My grandfather loved nothing more than to take us around the sights – the Empire State, the Twin Towers, Macy’s, the countless delicatessens shining as culinary diamonds in the rough preserve of Mexicans making Chinese food and Chinese baking Pizzas. My grandfather spent all his years in New York, knew every inch of the serpentine BQE (Brooklyn-Queens-Expressway) slithering over and through industrial Brooklyn on its way up north to upstate and sweet oblivion, finally exploding into the Hutch, the Cross-Bronx, and the Bruckner.
Not that he would have ventured that far north – he hated grass, and crickets. Especially crickets.
I don’t want to give the impression that my family is parochial; they’re well-traveled and world-wise, but they always come back. I still haven’t returned.
I ‘ve turned my world travels into an art project – just as the skylines of all the places I’ve visited and lived get jumbled in my head over time, this software remixes them and rescales them and blends them into a chimera of a city. I’ll add to it over time but right now it is NY (New York City) LON (London). Sometimes it gets intimate, and small places crowd out the big, important, impersonal ones. Use the mouse to navigate. Mac-only (for now). Enjoy.
If you’d like to show it somewhere, please contact me at pixelpusher@flkr.com, I’m open to the idea.
2 Comments
by pixelpusher on Sunday 27 April 2008
[Blog, Software]

Originally uploaded by da mad pixelist on flkr
I’ve been playing with the offsetcircles patch from before, and came up with a whole bunch of nice results. Taking a page from Claude, I made the drawing recursive (hmm… makes me want to use Scheme…) and rendered out these two short videos. These are fun experiments in basic, rotary motion. Its really amazing what fun you can have with simple math, rotations, and some blending.
There’s also this one.
Here’s the actual sketch plus code (the last version, anyway):
No Comments
by pixelpusher on Tuesday 25 March 2008
[Blog, Software]

You’ve probably heard of Marcel Duchamp, Man Ray, and Picabia. If you haven’t, and especially if you have, and you happen to live somewhere near London, go directly to the Tate Modern to see their new exhibition of their combined works, do not pass go, do not collect $200. This exhibit is so chock full of major works that you can easily get lost, or worse, distracted.
From the Tate Modern exhibition website:
In the 1920s Duchamp ostensibly gave up making art works to play competitive chess. But he was fascinated by the idea of creating virtual forms. Helped at times by Man Ray, he experimented with stereoscopic views and built a number of devices that generated the illusion of seeing a drawing or design in three dimensions.
The devices that “generated the illusion of seeing a drawing or design in three dimensions” consist of what look like CAD drawings on circular plates; circles of increasing diameter nestled inside one another, filling the whole disc, or filling part of the disk along with the skeleton of a 3D cylinder, and other fractal-looking drawings composed of similarly nested, self-similar shapes. The discs (there are many of them) are aligned in a grid pattern, and each slowly rotates. Staring at them gives the impression of a 3D objects slowly spinning on an off-center axis.
I was a bit blown away by this concept, dating from not long after the invention of electrical machines. I’m not a great art historian, but a friend called this Op-Art and I agree with that classification. Now, the brilliant thing about having computers around to do drawings for us is that we aren’t limited to making a simple disc of optical illusions spin at a constant speed. First off, we aren’t even limited to a single version of that disc. I can make an almost infinitely variable sketch of rings-within-rings, and spin them at a variable rate based on a simple software program (Processing; source code included).
I showed this to a few friends the other night at one of our OpenLab OpenSalons (a fairly casual get-together where a few of us show some works in progress, drink, eat, and geek out), and Robert Atwood pointed out that there’s no reason to limit the sketch to rotating the entire disc – we can make every inner ring of it spin independently. As we discussed what it might look like, Claude quietly made this happen (using Pd/GEM).
One Comment