Here’s how you can make Lightbox work in WordPress 2.5.1 (after a lot of trial-and-error)…
You’ll need the Slimbox WordPress Plugin.
You’ll also need to edit the /wp-includes/post-template.php file:
Somewhere near line 390, replace
return "<a href='$url' title='$post_title'>$link_text</a>";
//mafro lightbox mod
list($url, $w, $h) = wp_get_attachment_image_src($id, "full", $icon);
return "<a href='$url' title='$post_title' rel='lightbox[roadtrip]'>$link_text</a>";
I found that WordPress PHP adjustment in a comment made by Mauro in WP 2.5 Gallery Lightbox Plugin, and I just modified it with “[roadtrip]” which is used by the Slimbox plugin.
Similar to Mauro, I wasn’t able to solve the picture-to-picture issue with WP 2.5 Gallery Lightbox plugin.
With the Slimbox WordPress Plugin, however, the left/right arrow keys will allow you to easily view the different photos in your WP Gallery.
It’s not ideal, because each time we upgrade WP we will need to manually edit the post-template.php file, but at least this Lightbox plugin works with WP 2.5.1
You might need to check, though, if it will cause any conflict with your other plugins.
Do you want to see this WordPress 2.5 Lightbox plugin in action? Check out the May 2008 Dragonboat Race Photo Gallery of TheActiveAchiever.com, click on any of the square thumbnail photos, and then use your left/right arrow keys to move from pic to pic.