Support » Plugin: oik-nivo-slider » 1.14.1 hiding everything but the image on subsequent slides

  • Resolved Anton42

    (@anton42)


    Hi,

    Thanks for re-adding the shortcode initialization in the plugin, but the logic to add display:none to “everything” broke my slides — I am using captions, and with the latest version caption is only shown for the first slide, and not for slides 2 etc.

    I will still try to figure it out (otherwise I need to roll-back), but I’d appreciate any advice on what could be wrong.

    https://wordpress.org/plugins/oik-nivo-slider/

Viewing 5 replies - 1 through 5 (of 5 total)
  • OK, I found that it is caused by
    tags inserted into image title, your code changes all ‘/>’ to ‘display=”none” />’, it needs more checking to allow HTML in titles (which was supported before).

    Alright, seems like I solved it, let me know if this is correct.

    In oik-nivo-slider/nivo.inc, I replaced this line, which indiscriminately changes all of the string, breaking all HTML included in tag attributes by inserting double quotes:

    $thumbnail = str_replace( "/>", ' style="display:none" />', $thumbnail );

    By this, which only replaces the closing of the image tag:

    $thumbnail = preg_replace('/\/\>$/', ' style="display:none" />', $thumbnail);

    This does assume that retimage always returns image code with “/>” at the very end of the string, but it works in my situation.

    Plugin Author bobbingwide

    (@bobbingwide)

    Hi Anton42, thanks for that. retimage() should return “/>” at the end of the string. I’m unable to reproduce your problem as stated.

    Can you confirm the syntax of your nivo shortcode and the HTML used in your titles or captions?

    I have found another scenario where it goes wrong, but it would appear to be for a different reason.

    I’ve raised an issue on GitHub.
    https://github.com/bobbingwide/oik-nivo-slider/issues/3

    Plugin Author bobbingwide

    (@bobbingwide)

    Hi, I’ve released a fix for the problem I was able to create with HTML in titles. Can you take a look and see if this fixes your problem as well?

    Confirmed, this solves the problem, thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘1.14.1 hiding everything but the image on subsequent slides’ is closed to new replies.