WordPress.org

Ready to get started?Download WordPress

Forums

Using Lightbox Plus with 2.5.1 (10 posts)

  1. noelgreen
    Member
    Posted 6 years ago #

    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.

  2. dig1618
    Member
    Posted 6 years ago #

    worked for me as well.

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

  3. Falco Stellare
    Member
    Posted 6 years ago #

    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.

  4. BlaenkDenum
    Member
    Posted 6 years ago #

    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.

  5. rigg4d
    Member
    Posted 6 years ago #

    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.

  6. johncuts
    Member
    Posted 6 years ago #

    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?

  7. danapalooza
    Member
    Posted 6 years ago #

    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.

  8. danapalooza
    Member
    Posted 6 years ago #

    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!).

  9. hawkwood
    Member
    Posted 6 years ago #

    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.

  10. 2046
    Member
    Posted 6 years ago #

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

    thx man

Topic Closed

This topic has been closed to new replies.

About this Topic