Support » Plugin: Easy FancyBox » Links from Page Comments are displayed in Fancybox

  • 3fxvreofo4w6aystbfx


    Dear FancySupport,

    when a reader posts a comment with a link to an image file, the image will be displayed in FancyBox. It does not matter if the link is in the name,url,email or comment itself.

    As I run a “picture website” that issue affects me almost daily.

    I wrote a simple regex in the past which filtered out all other websites and only displayed imaged from my page. But sometimes we link to pictures from other sites, which then are not displayed in FancyBox. Or, then, in some comments, pictures from my own website are linked and then all these links are displayed falsely in FancyBox.
    Is there a simple way to stop this behaviour? We need just the pictures from the “Post/Page”.


Viewing 1 replies (of 1 total)
  • Hi, sorry no the plugin was not created with the option of images in comments in mind… Is that another plugin or your theme that offers that possibility?

    Usually, adding a class nofancybox or nolightbox to a media link, FancyBox should not bind itself to that link. But adding such a class to media links in comments might not be easy…

    Maybe a little javascript to do that? Note that this must run before FancyBox runs (at document load).

    Otherwise, there is the option to tweak which image links are autodetected in the Pro extension but it depends on your theme what settings should be applied to make it work.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.