Support » Plugin: NextGEN Gallery - WordPress Gallery Plugin » [Plugin: NextGEN Gallery] Suggested change to avoid empty tooltip

  • If a picture has no description, you get an empty tooltip when hovering on it in the gallery with IE (always) and Chrome (from time to time). There is no problem with FF and Opera.
    After digging a bit in the code, I came across line 368 of nggfunctions.php (version 1.9.3) :
    $picturelist[$key]->description = ( empty($picture->description) ) ? ' ' : htmlspecialchars ( stripslashes(nggGallery::i18n($picture->description, 'pic_' . $picture->pid . '_description')) );

    If I replace it with I dont’ have the problem anymore (just removed the space between the ”):
    $picturelist[$key]->description = ( empty($picture->description) ) ? '' : htmlspecialchars ( stripslashes(nggGallery::i18n($picture->description, 'pic_' . $picture->pid . '_description')) );

    I was wondering if there is any reason (there must be one) for those ‘ ‘ in case of empty string. There are many other ones in the code. Otherwise, removing them would allow for those empty tooltip to disappear.

    http://wordpress.org/extend/plugins/nextgen-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
  • crdunst

    (@crdunst)

    Thanks for posting this, it helped me at least..

    Helped me too! Thanks! I also had to remove the space on line 369 to make it work. ]
    From:
    $picturelist[$key]->alttext = ( empty($picture->alttext) ) ? ‘ ‘ : htmlspecialchars ( stripslashes(nggGallery::i18n($picture->alttext, ‘pic_’ . $picture->pid . ‘_alttext’)) );

    To:
    $picturelist[$key]->alttext = ( empty($picture->alttext) ) ? ” : htmlspecialchars ( stripslashes(nggGallery::i18n($picture->alttext, ‘pic_’ . $picture->pid . ‘_alttext’)) );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: NextGEN Gallery] Suggested change to avoid empty tooltip’ is closed to new replies.