Hi Dhanu,
You're right that you never want to edit the core of Omeka to make this type of theme modification. Our plugin architecture has been designed to help. We're in the process of adding additional options which will make this easier, and hopefully be included in the next full release: (https://omeka.org/trac/ticket/479). In the meantime, I have a solution that will work. It's a little extra code than I'd prefer, but it will get the job done.
You'll want to create a plugin. Please refer to plugin best practices (http://omeka.org/codex/Plugin_Writing_Best_Practices), and join our developer mailing list (http://groups.google.com/group/omeka-dev) to discuss this further. There's a plugin hook that allows you to switch out the display of files of a particular mime type. So it'd be relatively straight-forward to change how, for example, a JPEG image is handled and how it's displayed on the page. Here's some example code of a plugin.php file that could be in a potential plugin:
<?php
// Arguments = MIME types to catch, callback to use, default options to pass to callback (can be overridden in theme call to display_files())
add_mime_display_type(array('image/jpeg'), 'displayImageLightbox', array());
public function displayImageLightbox($file, array $options=array())
{
$html = '';
$item_title = item('Dublin Core', 'Title');
if ($options['linkToFile']) {
$html .= '<a href="'.file_download_uri($file).'" class="download-file">';
}
/**
* Setting a variable for content for the alt attribute for images.
* Problem with alternative text is that it should describe what's going
* on in the image, so should use the file description first. Item title
* usually doesn't describe what's in the image specifically, but is provided
* as a last resort.
**/
if (!empty($file->description)) {
$alt = $file->description;
}
elseif (!empty($file->title)) {
$alt = $file->title;
}
elseif (!empty($item_title)) {
$alt = $item_title;
}
$img = '';
switch ($options['imageSize']) {
case 'thumbnail':
$img = thumbnail($file, array('class'=>'thumb', 'alt' => $alt, 'rel' => 'lightbox'));
break;
case 'square_thumbnail':
$img = square_thumbnail($file, array('class'=>'thumb', 'alt' => $alt, 'rel' => 'lightbox'));
break;
case 'fullsize':
$img = fullsize($file, array('class'=>'full', 'alt' => $alt, 'rel' => 'lightbox'));
break;
default:
break;
}
$html .= !empty($img) ? $img : htmlentities($file->original_filename);
if ($options['linkToFile']) {
$html .= '</a>';
}
return $html;
}
The displayImageLightbox function is almost identical to what's included in the Media.php file, however I've added 'rel' => 'lightbox'. That should work fine. You can also use the public_theme_header function to add the necessary javascript files to the theme as well.
I believe Mark Matienzo at the New York Public Library has done some work with a lightbox as well. It'd be great if you could release whatever you build for others to use.
Cheers,
Dave