Hey, guys!
I couldn't find any way to set lightbox iframe height and width in percents ( and it wasn't implemented in previous versions either), also I failed when trying to use width and height options like rel="lightframe[|width:100px; height: 100px;]".

That's why i wrote my own patch, that makes an additional setting item in settings form for lightbox2.
Just go to 'Congifuration -> Lightbox2 -> Advanced settings' and you will see an item called "iFrame settings". There are two fields inside (height and weight), where you can put your own values in percents and it will affect on eventual iframe size.

I'm not sure it's the best way to get it done, of course the better way is to set this in attributes, but it seems to be very weighty task that i can't handle right now.
Anyway, maybe this patch will push somebody to implement it in a future releases of lightbox.
THANKS!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kruser’s picture

Patched worked for me. Thanks.

Vinay Punyamurthy’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta1

Hi barbun,
This is a great idea, I've been trying this from quite sometime but was not able to achieve this!

I followed all the steps mentioned to apply the patch for my version 7.x-1.0-beta1.

I'm able to get iframe settings fieldset in the admin configuration page, but it does not have the fields to input height and width! May be there's something more I need to do to fix the issue?

can you help me fix this issue?

Thanks in advance.

kitikonti’s picture

Patch works fine, nice work.

HansKuiters’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Works fine for me.

pifagor’s picture

Look good

alex_optim’s picture

+1

voleger’s picture

Version: 7.x-1.0-beta1 » 7.x-2.x-dev
Category: Bug report » Feature request
Status: Reviewed & tested by the community » Needs work
FileSize
4.76 KB

Rerolled.
I can't push it as is. It will change the default behavior of iframe settings. We should make this feature optional to safe BC.

florisg’s picture

rerolled against latest git: a91a9e8a