Control Over Lightbox Image Size: configure which image size should be displayed in the lightbox, e.g. preview or original.

Does this really exist?
I can't find anywhere in the UI ... or even the code where this looks to be happening.
I've got my images defined as thumbnail, preview (450 to fit inside all columns) and also a nice 1280 as the max screen scale, but the images (my client) uploads are often even bigger.

I thought I could standardize on my big-screen-res, but lightbox keeps throwing me the original instead.
Is this a lost feature? or 6.x only?
Is it considered redundant under the fit-to-screen zoom? Coz it's not to me.

Comments

stella’s picture

Status: Active » Fixed

On the /admin/settings/lightbox2/automatic configuration page, there is the "Lightbox image display size" option. This allows you to choose a lightbox display size from the various image node image sizes available. Whichever size you pick here is the size that will be displayed in the lightbox as long as (a) the image being clicked on is an image node and (b) the image exists (if it doesn't exist, the original will be displayed). This option is unrelated to the zoom feature.

Cheers,
Stella

dman’s picture

Sorry, i've got lightbox2-5.x-2.2 And I just can't see it on that page ... (I thught I had the CVS checkout actually, but apparently not)

... ah yes, that's why. When I did a CVS checkout of DRUPAL-5 I ended up with a scriptaculous version ... which didn't seem right, so I retrieved from bundle instead.

Sooo. it's branched sideways at DRUPAL-5--2 which is no longer counted as DRUPAL-5 :-/
I see.

 cvs co -d lightbox2 -r DRUPAL-5 contributions/modules/lightbox2

... which I use for everything else to get the most recent D5 dev version - failed.

 cvs co -d lightbox2 -r DRUPAL-5--2 contributions/modules/lightbox2

... Gave me version dev-[1.16.2.17.2.52] ( and an error ... until I flushed my menu cache).

Now I can see the options!! Great. Sorry for commenting on what was not the latest release. Branching away from the DRUPAL-5 tag was what confused me. Bloody CVS.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

yan’s picture

Version: 5.x-2.x-dev » 6.x-1.9
Status: Closed (fixed) » Active

Sorry for re-opening this again, but I'm using Lightbox2 6.x-1.9 and I can't find the "Lightbox image display size" option. I don't have image nodes but an imagefield attached to stories. I'd like to use an imagecache preset to set the size of the zoom picture.

tike012’s picture

To yan and everyone trying to get Lightbox working--this is what I did:

Assuming you have Lightbox, ImageCache, ImageAPI, and any other prerequisites installed, you should be able to go to Site Building > ImageCache where you can set your presets. Once you have at least one defined, go to your Stories content type and click Manage Fields, then Display Fields. There under your Image field you should see in the drop-down menu a listing for "Lightbox2: preset1->preset2" as well as various other options. The first preset is what the image will show up as initially in your node/teaser/etc., while the second is what it will look like in the Lightbox viewer.

Hope this helps.

yan’s picture

Status: Active » Fixed

Thanks for your reply tike012. I already knew that option but it was a little more complicated since I was trying to set the size for lightbox images that I link to on a theme level. I guess I hadn't realized that the image size is always the size of the image linked to with the rel="lightbox" attribute. I solved the problem by creating an imagecache preset and then preparing the image url using imagecache_create_url(). Then I linked to that image:

// prepare link
$lightbox_path = imagecache_create_url('<imagecache preset>', $image['filepath']);

// print lightbox link
print '<a href="' . $lightbox_path . '" rel="lightbox"><link text></a>';

(Would be nicer to use the l() function, though.)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

yan’s picture

I think using l() it would look like this:

// prepare link
$lightbox_path = imagecache_create_url('<imagecache preset>', $image['filepath']);

// print lightbox link
print l('<link text>', $lightbox_path, array('attributes' => array('rel' => 'lightbox')));