lightbox issue

Hi,

I am trying to get lightbox working for my images and I followed all the instructions that are on the site here but it is not working.

As far as I can tell, the problem has something to do with the thumbnail link. When I hover over it, the link appears to be http://.../files/download/####/fullsize but I think for lightbox to work it has to be the image address to work (ie. http://.../archive/fullsize/imagelink.jpg)

Does anyone know how I would go about getting the thumbnail to point directly at the image?

Thanks!

Hi,

Where are you trying to implement the lightbox? From the paths you provided I'm guessing on the items/show page, but I just want to confirm.

Hi,

Yes, it is the items/show page that I am trying to get it to work on--though when I hover over the thumbnails on the browse page, it gives me the same link (http://.../files/download/####/fullsize)

Hi dnwng,

Try adding this to your items/show file

<!-- The following returns all of the files associated with an item. -->
	<div id="itemfiles" class="element">
	    <h3>Files</h3>
		<div class="element-text">
		    <?php
		    if (item_has_thumbnail())
					{
					echo '<p><em>Click the Image for Full Size</em></p>';
					echo display_files_for_item(array('linkAttributes'=>array('rel'=>'lightbox[gallery]')));
										}
			else
				{
				echo display_files_for_item();
				}
			?>

		</div>

	</div>

I believe that the way Omeka works is not to point at the actual .jpg file but to the item/fullsize/ location. This can be a bit odd if you aren't expecting it, but it's normal.

My best guess is that you need to be sure to call the lightbox script in your header in just the right way. There are a couple ways to do so, but I used the following, where BerlinGallery is the name of my theme and lightbox is located in the theme's /common/ directory, like so...

<!-- Start Lightbox includes -->
<script type="text/javascript" src="<?php echo WEB_ROOT;?>/themes/berlinGallery/common/lightbox/js/prototype.js"></script>
<script type="text/javascript" src="<?php echo WEB_ROOT;?>/themes/berlinGallery/common/lightbox/js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="<?php echo WEB_ROOT;?>/themes/berlinGallery/common/lightbox/js/lightbox.js"></script>
<!-- End Lightbox includes -->

Hope this helps. -- Erin

Note in the above example, in case it wasn't clear, that you need to change the theme name to match your own and have the lightbox package inside the common folder.

Alternatively, if you put the lightbox package in your theme's javascripts directory, you could call the files in your header like so...

<?php echo js('lightbox/js/lightbox'); ?>

You might also want to check the configurations in js/lightbox.js once you get going to troubleshoot the loading and close labels. In my experience, Omeka requires the full path/URL
to those images, rather than relative paths. This might vary in different environemnts.

around lines 49-50:

fileLoadingImage: *enterPathToFilesHere*
fileBottomNavCloseImage: *enterPathToFilesHere*

Thanks for the help Erin--I just figured it out now and it was all just because of a big oversight on my part! The permissions on the lightbox folder were not set right!