WordPress.org

Support

Support » Requests and Feedback » Using Lightbox Plus with 2.5.1

Using Lightbox Plus with 2.5.1

  • noelgreen
    Member

    @noelgreen

    If you’re having problems with Lightbox Plus and WP 2.5.1 then here’s how to fix it.

    Open your post-template.php file from your wp-includes folder. Find this line of code (around line 390 or 391):

    return "<a href='$url' title='$post_title'>$link_text</a>";

    Replace it with this:

    //noelgreen lightbox mod
    list($url, $w, $h) = wp_get_attachment_image_src($id, "full", $icon);
    $post_id = get_the_ID();
    
    return "<a href='$url' title='$post_title' class='lightview' rel='gallery[$post_id]'>$link_text</a>";

    That should do it.

Viewing 9 replies - 1 through 9 (of 9 total)
  • worked for me as well.

    what is the difference between your hack and mafro‘s?

    Falco Stellare
    Member

    @falco-stellare

    Fantastic! It worked like a breeze! I’m running WP 2.5.1 with NextGEN Gallery 0.95 and LightView Plus 1.1.9; it’s important to disable all alternative plugins for overlay effects than the ThickBox installed as default by NextGEN Gallery, otherwise the LightView Plus plugin will not work, even if correctely installed and activated.

    In the “Gallery / Options / Effects” section I selected “Predefined” as javascript effect for thumbnails, and then entered this snippet into the code line field:

    class=”lightview” rel=”gallery[%GALLERY_NAME%]”

    Check for the the correct double quotes when you copy and paste this snippet!!!

    Now my galleries regularly use the new and beautiful LightView Plus effect for overlay image browsing, you can check them out at:

    http://www.sulletraccedeighiacciai.it

    that is the new weblog I’m setting up for a forthcoming new italian photographic-scientific expedition aimed at detecting the depletion rate of the glaciers in the Karakorum region during the last 100 years.

    BlaenkDenum
    Participant

    @blaenkdenum

    Does this work for thumbnails that are inserted into a post using the TinyMCE/GUI or only on galleries? I did the above modification and when I view the post source, the class isn’t added to the link when a thumbnail is posted.

    How about pages (not posts). Is there any other templates I should modify to make it work? Because it’s still not working on my side.

    Thanks for any help!

    WP 2.5.1
    tried Lightbox 0.7, Lightbox-2, Slimbox too.

    I am having what I think is a little trouble
    Have a look at this gallery
    http://jigtime.com/word/magfest-gallery/

    When you click on the thumbnail it seems to bring up a lightbox type view first and then go into lightbox – plus mode. And when you are finished browsing the images and close it, it stays on the image you were browsing in a overlay underneath… if you pardon the bad grammer… you will see what I mean
    Do I have something else running that is causing this and if you know what it is how do I get rid of it. Or is this the way the plugin is supposed to work?

    danapalooza
    Member

    @danapalooza

    This mod is not working for me. I am still getting just the image instead of the lightbox view. It is not taking me to the file’s page or anything like that but the lightbox function is not working.

    danapalooza
    Member

    @danapalooza

    I’m an eeeeeeeediot!

    I think the last time I updated the Lightbox Plus plugin I failed to re-upload the necessary files from the lightview page

    It works. It fixes the Lightbox Plus plugin (which is what I was looking for) plus it adds lightbox functionality to my de facto WordPress 2.5 galleries (added benny!).

    I just released a plugin, gallery-plus, that can add the lightbox attribute to the gallery. You need to install the lightbox 2 plugin also. I personally use version 2.6.0.

    2046
    Participant

    @o-o

    works even with shutter reloaded
    http://wordpress.org/extend/plugins/shutter-reloaded/

    thx man

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Using Lightbox Plus with 2.5.1’ is closed to new replies.