Forums

problem with lightbox plugin (3 posts)

  1. tales
    Member
    Posted 2 years ago #

    Hi, after upgrade WP my lightbox plugin stops working.
    I found some clues about the problem.
    On the wp-lightbox2.php file there is one function above:

    function wp_lightbox2_replace($string) {
    $pattern = '/(<a><img)/ie';
    $replacement = '(strstr("25","rel=") ? "1" : "</a><a><img")';
    return preg_replace($pattern, $replacement, $string);
    }"

    It seems that this function looks for the string href=" and img on the page and put the code rel="lightbox" on it.

    But on WP 2.1 the when i looked at the page code, i found links like: <img src='http:/....>
    As far as i understood the functon looks for <img src="http://.....>
    So the plugin looks for " and wp 2.1 uses links with '
    Can anyone give me a help tho solve this issue?

  2. samboll
    moderator
    Posted 2 years ago #

    You probably need to upgrade to the latest version.
    Lightbox (http://www.m3nt0r.de/blog/lightbox-wordpress-plugin/) 2.0 Plugin 0.6 Final

  3. tales
    Member
    Posted 2 years ago #

    Hi, samboll.. I tried the 0.6 and the 0.63 without success.
    Every image that i upload to a post the image url goes like <img src='http://..../file.jpg'> whith single cotes on the image url, if i manualy edit the tag changig the single for double cotes like <img src="http://..../file.jpg"> makes the lightbox works fine.

    I've just testes right now, created an test post uploaded an image and the url was created with single cotes.

    http://talesparreiras.com/blog/2007/01/25/test-post/

    in this case the plugin not works, bus if i manuly edit the url changing the cotes it will work.

    How to make the Wordpress post using double cotes like in older versions?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags