Forums

Using Lightbox Plus with 2.5.1 (5 posts)

  1. noelgreen
    Member
    Posted 3 weeks 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 2 weeks ago #

    worked for me as well.

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

  3. Falco Stellare
    Member
    Posted 2 weeks 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 2 weeks 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 1 week 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.

Reply

You must log in to post.

About this Topic