December 2009 Archives

Against the sun in Delft

| No Comments

Three photos from Amsterdam

| No Comments

Somehow I don’t get to photograph much when I’m in Amsterdam. Here are the only ones I like from the last two times I was there.

If you ever wondered how to attach SLR lenses to your iPhone, well, Bhautik Joshi did and documented it all here.

iPhone with a zoom lens

Great work. I think this is hilarious and genius at the same time.

I had been intending to put some photos in this blog from time to time. However Movable Type does not provide any tools beside a simple thumbnail and pop-up window options.

But I wanted something cooler than that such as overlays and in-window-pop-ups provided by Highslide.

However, it is not straight-forward to put Highslide galleries into Movable Type. I googled a bit over the weekend and I could not find any plug-ins offering a solution. Well, except for a japanese blog, where a solution was described, but in japanese. With the help of Google Translate and some common sense I was able to come up with a solution, which I also used on the two posts with Prague photos.

Here it is:

  • Go to /lib/MT/Asset folder inside where your MT installation lives on your server. This is cgi-bin/mt by default.

  • Backup Image.pm in this folder, and open the original file in your favorite text editor.

  • Find the following lines inside the as_html subroutine:
if ( $param->{thumb} ) {
$text = sprintf(
        '<a href="%s"><img alt="%s" src="%s" %s %s/></a>',
        MT::Util::encode_html( $asset->url ),
        MT::Util::encode_html( $asset->label ),
        MT::Util::encode_html( $thumb->url ),
        $dimensions,
        $wrap_style,
  • And change them into:
if ( $param->{thumb} ) {
$text = sprintf(
    '<a href="%s" class="highslide" onclick="return hs.expand(this)" >
    <img alt="%s" src="%s" %s %s/> </ a> ',
    MT::Util::encode_html( $asset->url ),
    MT::Util::encode_html( $asset->label ),
    MT::Util::encode_html( $thumb->url ),
    $dimensions,
    $wrap_style,
);
  • This causes all your thumbnails to become Highslide links. This is what I wanted anyway but if you don’t want this, undo your changes and start looking for another solution.

  • Now you just have to insert your Highslide scripts and configuration between the <head> and </head> tags in the templates where you want to be able to use Highslide. If you want to be able to insert Highslide thumbnails in all pages and entries, it is best to put the Highslide scripts into the default “HTML Head” template of you Movable Type installation. I am not providing any code for this since it depends on your Highslide installation and configuration. Look at the source of this page to get an idea…

  • Now all images with thumbnails should show Highslide thumbnails and enlarge if you click on them. Other images are not affected.

Reblog this post [with Zemanta]

Folding Plug System

| No Comments

This is one of the best ideas I have ever seen:

The foldable plug



Prague details - March 2009

| No Comments

Finally some photos from my last trip to Prague…

Karlov Most - Prague - March 2009

| No Comments

A cold and snowy afternoon on the Karlov Most in Prague.