WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Clickable images?

[Resolved] Clickable images?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Stefan Boonstra

    @stefanboonstra

    Yes, this will be possible in version 2.3.0 of the plugin. At the moment it’s not possible yet.

    Great!
    Any idea of when 2.3 will be released?

    The site I’m developing needs this feature pretty soon, I would have to do something myself (which I really don’t have time for) if it takes too long.

    Plugin Author Stefan Boonstra

    @stefanboonstra

    I don’t have a release date planned for version 2.3.0 yet. Version 2.2.X needs to become as stable as possiblem first, to move on to the next version.

    You can easily put in a lightbox of your own, though. First download this lightbox plugin, then look up the ‘wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginSlideshowSlide/frontend_attachment.php‘. file.

    In this file you have to locate line number 57, where the ‘<img />‘ tag is visible. Make this line look like this:

    <img src="<?php echo htmlspecialchars($imageSrc); ?>" alt="<?php echo $alt; ?>" rel="lightbox" <?php echo ($imageWidth > 0) ? 'width="' . $imageWidth . '"' : ''; ?> <?php echo ($imageHeight > 0) ? 'height="' . $imageHeight . '"' : ''; ?> />

    All that’s been added to this line now, is ‘rel="lightbox"‘, adding a lightbox to the images if the lightbox plugin is active.

    that didnt worked for me, i suggest:

    1. With the current WP-Lightbox-Plugin you dont need to install the aforementioned “a-rel-plugin”, i am just using WP Lightbox 2, that provides the same functionality.

    2. edit the mentioned php-file on line 44 and add the mentioned “rel=”lightbox” to the <a href>-tag…. make it look like that:

    $anchorTagAttributes = (!empty($url) ? ' rel="lightbox" href="' . $url . '" ' : '') . (!empty($urlTarget) ? ' target="' .

    Anyways, there is still one disadvantage: you have to manually link the pictures to them sources in the slider-gallery.

    cheers

    The first version didn’t worked for me either.
    The version from nre works – thanks.
    However the image doesn’t resize to the screen.
    I have multiple slideshows on one site and when I open the lightbox I can switch through all of them. Is there a way to limit the lightbox to one slider?

    nre answer worked for me. The only problem was that I had to manually add the url of each image in the slideshow settings.
    So going back to the file /frontend_attachment.php’
    – did Nre change online 43
    – cut and pasted lines 43-45 (the $anchorTagAttributes variable) after the line 96
    – made other changes; finally it looks like this
    // Anchor tag is used twice
    $anchorTagAttributes = ‘ rel=”lightbox” href=”‘.htmlspecialchars($imageSrc) . ‘” ‘ . (!empty($urlTarget) ? ‘ target=”‘ . $urlTarget . ‘” ‘ : ”) . $noFollow;

    but it has to be moved down otherwise the $imageSrc is not declared where it was on line 43.

    I want to add to the rel Attribute the slideshow id. But I don’t now how I can get it.
    It should be look like this:

    $anchorTagAttributes = ‘ rel=”lightbox[‘.$slideshowId .’]” href=”‘.$url . ‘” ‘ . (!empty($urlTarget) ? ‘ target=”‘ . $urlTarget . ‘” ‘ : ”) . $noFollow;

    I need to define $slideshowId.
    Then I would be possible to have multiple sliders on one side and the lightbox is limited to one slider.

    aauro approach works for me.
    Because I don’t need the $url variable, I replaced it with the $imageSrc, so I don’t have to manually add the urls.

    Before:
    $anchorTagAttributes = (!empty($url) ? ' rel="lightbox" href="' . $url . '" ' : '') . (!empty($urlTarget) ? ' target="' . $urlTarget . '" ' : '') . $noFollow;

    After:
    $anchorTagAttributes = (!empty($imageSrc) ? ' rel="lightbox" href="' . $imageSrc . '" ' : '') . (!empty($urlTarget) ? ' target="' . $urlTarget . '" ' : '') . $noFollow;

    Step 1:
    Open wp-content/plugins/slideshow-jquery-image-gallery/views/SlideshowPluginSlideshowSlide/frontend_attachment.php

    Step2:
    Remove the $anchorTagAttributes from line 43/44 and copy & paste the above definition (“After:”) to line 95/96.

    Step3:
    Install the best Lightbox Plugin: http://wordpress.org/plugins/responsive-lightbox/

    however it displays me now 3 times the same image file before the next image motif is shown … ???

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] Clickable images?’ is closed to new replies.