image size with lightbox

156 views
Skip to first unread message

nancym

unread,
Sep 15, 2011, 3:10:53 PM9/15/11
to Omeka Dev
Hi,

I am using the lightbox to display a group of images with full size.
however, every time i clicked on the image the light box displayed
making the images width and height equal to 200px.

I tried to change the width and height in the css file but i saw using
the fire bug that the width and height is changed auto to a smaller
scale.

Any help how I can solve this.

Thanks
Nancy

nancym

unread,
Sep 15, 2011, 3:11:00 PM9/15/11
to Omeka Dev

Jeremy Boggs

unread,
Sep 15, 2011, 8:37:09 PM9/15/11
to omek...@googlegroups.com
It sounds like your linking to, or using, the square thumbnail for the file instead of the fullsize. I'm not entirely certain though, without looking at a page where you've implemented this, or without looking at the code your using to generate the lightbox. Can you share either or both of those?

Best,
Jeremy

> --
> You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
> To post to this group, send email to omek...@googlegroups.com.
> To unsubscribe from this group, send email to omeka-dev+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/omeka-dev?hl=en.
>

aligre

unread,
Apr 12, 2012, 4:09:06 PM4/12/12
to omek...@googlegroups.com

Hello,

I'm having a similar issue.   I have regular thumbnails on my items pages and when I click on them the lightbox displays the original image. The problem is that when I click on a thumbnail I want Lightbox to display images from archives/fullsize rather than archives/files. How could I go about doing this? Here's the code in my items/show.php file:

<?php
if (item_has_thumbnail())
{
echo '<p>Click the Image for Larger View</p>';
echo display_files_for_item(array( 'linkAttributes'=>array('rel'=>'lightbox[gallery]')));
}
else
{
echo display_files_for_item(array('imageSize' => 'thumbnail'));
}
?>

Any suggestions would be greatly appreciated!

Thanks,

Aligre



On Thursday, September 15, 2011 8:37:09 PM UTC-4, Jeremy Boggs wrote:
It sounds like your linking to, or using, the square thumbnail for the file instead of the fullsize. I'm not entirely certain though, without looking at a page where you've implemented this, or without looking at the code your using to generate the lightbox. Can you share either or both of those?

Best,
Jeremy

On Sep 15, 2011, at 3:11 PM, nancym wrote:

> Hi,
>
> I am using the lightbox to display a group of images with full size.
> however, every time i clicked on the image the light box displayed
> making the images width and height equal to 200px.
>
> I tried to change the width and height in the css file but i saw using
> the fire bug that the width and height is changed auto to a smaller
> scale.
>
> Any help how I can solve this.
>
> Thanks
> Nancy
>
> --
> You received this message because you are subscribed to the Google Groups "Omeka Dev" group.
> To post to this group, send email to omek...@googlegroups.com.

> To unsubscribe from this group, send email to omeka-dev+unsubscribe@googlegroups.com.

Jeremy Boggs

unread,
May 15, 2012, 3:53:33 PM5/15/12
to omek...@googlegroups.com
Doesn't look like it's possible to change the 'href' value to the fullsize version of images through the `display_files_for_item` options. You could just create a separate loop of image files instead of using display_files_for_item(). Or, if you're using Omeka 1.5, however, you can use the 'display_file' filter to change this, and also add the lightbox string to your `rel` attribute. I just made a gist with some code that should accomplish what you want, with some explanation in the code.[1] Just add this code to your theme's functions.php file, and you should be set. Suggestions for improvement are welcome, too!

Best,
To view this discussion on the web visit https://groups.google.com/d/msg/omeka-dev/-/wWmvcA7tH4QJ.

To post to this group, send email to omek...@googlegroups.com.
To unsubscribe from this group, send email to omeka-dev+...@googlegroups.com.

Jeremy Boggs

unread,
May 16, 2012, 11:16:41 AM5/16/12
to omek...@googlegroups.com
Correction: Add that code to your theme's custom.php file, not functions.php. (I'm getting Omeka and WordPress mixed up again.)

If you theme doesn't have a custom.php file, just make one and add that code to it.

Best,
Jeremy
Reply all
Reply to author
Forward
0 new messages