WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
[resolved] How to change lightbox image size (12 posts)

  1. bibigeon
    Member
    Posted 12 months ago #

    Hello,

    Basicaly I've had issues with the lightbox size depending on what browser I'm using. Chrome seems to be fine, although Firefox is just throwing pictures full sized when clicking on thumbnails.

    Is there anyway to fix this ? And is there a way to close a lightbox when clicking outside the picture area ?

    Thank you very much for your help, you've done a great job with this theme !

    The website is http://www.guide-lavandes.fr

  2. bibigeon
    Member
    Posted 12 months ago #

    update : For some reason, I can't even egt the lightbox to scale the browser resolution on chrome now...it just trows huge pictures :-/

  3. nikeo
    Member
    Theme Author

    Posted 12 months ago #

    Hi bibigeon,

    As of now, there is no option for scaling lightbox images.

    If you feel like drilling down into the code, you can modify the following line in customizr/inc/js/tc-fancybox.js. Replace

    'autoScale' : false,

    by

    'autoScale' : true,

    and that will force lightbox images to fit the screen.

    It could definitely be a improvement in the theme options.

    Hope this helps!
    Nicolas.

  4. ElectricFeet
    Member
    Posted 11 months ago #

    Neat! Can you add this to the basic theme so we don't need to re-edit every upgrade?

  5. bibigeon
    Member
    Posted 11 months ago #

    Thanks a lot nikeo ! It works perfectly.

  6. ElectricFeet
    Member
    Posted 11 months ago #

    @bibigeon

    And is there a way to close a lightbox when clicking outside the picture area ?

    Yes. Follow @Nikeo's instructions and change 'overlayShow' : false, to 'overlayShow' : true, and add 'hideOnOverlayClick' : true,

    Don't make the mistake I made a few weeks ago of forgetting to refresh the browser page before checking the code works. I gave up trying to make these changes as nothing seemed to work. Nikeo's post gave me the courage to try again and voilĂ !

  7. EthanEmerald
    Member
    Posted 11 months ago #

    Closing the fancybox by clicking outside it is a great suggestion.

  8. ElectricFeet
    Member
    Posted 11 months ago #

    Now that the autoscale option has been added to the basic theme (3.0.5) and Nikeo has done some moving around of files, you need to edit class-fire-ressources.php to change 'overlayShow' : false, to 'overlayShow' : true, and add 'hideOnOverlayClick' : true,

  9. bibigeon
    Member
    Posted 10 months ago #

    You all are awesome. <3
    Nikeo, make sure you send me a mail whenever you get a premium package going, Ill get it just to reward you for the great job !

  10. ShipperTom
    Member
    Posted 7 months ago #

    Hi I noticed that the class-fire-ressources.php has been changed recently, so the above doesn't work anymore since 'overlayshow' isn't in there anymore. ( if you've done the above in a child theme, the entire lightbox effect is gone and images just open in the active window )

    So where to add 'hideOnOverlayClick' now ?

  11. mharrisw
    Member
    Posted 4 months ago #

    How do I increase the size of the lightbox? My images fill the urgent box with no problem, but it seems that I am only using about 40% of the basic window and I would like to increase that size a bit.

  12. rdellconsulting
    Member
    Posted 4 months ago #

    @mharrisw, please start a new Topic. This one is marked [resolved]

Reply

You must log in to post.

About this Theme

About this Topic