Notes on Omeka

I've decided on using Omeka for a project after trying out several alternatives (Kete (Ruby+MySQL), CollectiveAccess (PHP+MySQL), ResourceSpace (PHP+MySQL). It's free software - PHP+MySQL - for creating digital archives and exhibitions. Fairly simple and very easy to install, yet flexible with Dublin Core metadata elements by default and support for OAI-PMH. There are also a whole bunch of plugins; I found Simple Vocab to be essential for my project. Plus, it looks good by default.

I will update this page with notes as the project progresses.

Problem uploading files with non-ASCII characters

When trying to upload a file with a non-ASCII character in the filename (åäö, ë, é etc.), Omeka (version 1.2.1) threw an error: "Something went wrong with image creation. Please notify an administrator." I looked in Apache's error log and noticed that convert (ImageMagick) was given the wrong filename - non-ASCII characters were stripped. I pinpointed the problem to application/libraries/Omeka/File/Derivative/Image.php, line 131:

$old_path = escapeshellarg( $old_path );

The real problem was however that LC_CTYPE wasn't set and thus incorrect. I fixed it by adding the following to the top of admin/index.php:

setlocale(LC_CTYPE, "en_US.UTF-8");

Link to original image

At first Omeka's naming conventions confused me a bit. Fullsize does not refer to the largest version of an image; it's actually an intermediate size, the one that's something like 600 pixels wide by default, the one shown on web pages. Omeka stores four different versions of every image: fullsize, thumbnail, square_thumbnail and archive. The last one is the original file. By default, the item/view pages show the fullsize image and link to the same fullsize image. But I wanted to show the fullsize and link to the original, big image.

In my theme's item/show.php (I used rhythm), I changed this (around line 11, after <div class="item-img">):

$file = get_current_file();
if ($file->hasThumbnail()):
    echo display_file($file,array('imageSize'=>'fullsize'));
endif;

to this:

$file = get_current_file();
if ($file->hasThumbnail()):
    $archiveurl = $file->getWebPath(archive);
    $fullsizeurl = $file->getWebPath(fullsize);
    echo "
"; endif;

Surely not the nicest way to do it, but it works for me.

2010-10-12 ·

blog comments powered by Disqus