WordPress.org

Ready to get started?Download WordPress

Forums

Slideshow
[resolved] Variable Height (7 posts)

  1. mhaberling
    Member
    Posted 1 year ago #

    Is there a way to set the slideshow height relative to its width?

    http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/

  2. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    Not yet, I'm sorry. In version 2.2.0 the slideshow's height will be relative to the slideshow's width. You'll then be able to give your slideshow a resolution like '16:9'.

    I'm hoping to release version 2.2.0 either at the end of this month (January 2013) or some time next month.

  3. tg1
    Member
    Posted 1 year ago #

    Hey Stefan,

    Hoping to catch you online...

    Can a person click on an image in the slideshow to open a lightbox? Is there any code for that?

  4. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    The Slideshow plugin doesn't officially support using a lightbox yet, but it's possible to adapt a line of code so you can. The only disadvantage is that you shouldn't update the plugin afterwards, since you'll lose the changes to it.

    If you've activated a plugin like this one, look up 'wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPlugin/slideshow.php' and at line 105 you can add 'rel="lightbox"' to the '<a>' tag to make the image pop up as lightbox. The change will make the line look like this:

    <a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?> <?php if(!empty($target)) echo 'target="' . $target . '"'; ?> rel="lightbox">

    Best regards,
    Stefan

  5. tg1
    Member
    Posted 1 year ago #

    Thanks Stefan - I will try this!

  6. mhaberling
    Member
    Posted 1 year ago #

    If I wanted to hardcode in a relative height for the time being where would you suggest I do that in the php?

  7. Stefan Boonstra
    Member
    Plugin Author

    Posted 1 year ago #

    I'm sorry, hardcoding a relative height in the current set-up of the plugin wouldn't be an easy change.

    You could try to change lines 1, 2, 28, 59 and 98 in the aforementioned file to always have a height of 100%, but you'll then need to give every element that's containing the slideshow a fixed height to make it appear as if the height is variable. This isn't ideal though.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic