Send me an URL that uses Fancybox + NextGEN and I’ll give it a try.
Thread Starter
Paul
(@paulcass82)
Thanks for the prompt reply. Below is a link to the test site I am working on.
My Test Site
Try this:
In my plugin, edit ngg-photoswipe.js, and replace this:
jQuery(document).ready(function(){
//Remove thickbox effect:
jQuery('a.thickbox').removeClass ("thickbox");
//Remove lightbox effect:
jQuery('a[rel^="lightbox"]').attr("rel","");
//Remove highslide effect:
jQuery('a.highslide').removeClass("highslide").attr("onclick","");
//Remove shutter effect:
jQuery('a[class^=shutterset]').removeClass (function (index, css) { return (css.match (/\bshutterset\S+/g) || []).join(' '); });
});
with this:
jQuery(document).ready(function(){
//Remove thickbox effect:
jQuery('a.thickbox').removeClass ("thickbox");
//Remove lightbox effect:
jQuery('a[rel^="lightbox"]').attr("rel","");
//Remove highslide effect:
jQuery('a.highslide').removeClass("highslide").attr("onclick","");
//Remove shutter effect:
jQuery('a[class^=shutterset]').removeClass (function (index, css) { return (css.match (/\bshutterset\S+/g) || []).join(' '); });
//Remove fancybox effect:
jQuery('a.fancybox').unbind('click.fb').removeClass('fancybox');
});
Let me know if it works.
Thread Starter
Paul
(@paulcass82)
Hi gsenas. Sorry that didn’t seem to work I have tried clearing the cache etc too just in case but the problem is still there 🙁
Put my plugin in “Always replace viewer with Photoswipe” mode in your test page and I’ll try to find what’s wrong.
Thread Starter
Paul
(@paulcass82)
Ok I’ve done this now thanks.
Try this code:
jQuery(document).ready(function(){
//Remove thickbox effect:
jQuery('a.thickbox').removeClass ("thickbox");
//Remove lightbox effect:
jQuery('a[rel^="lightbox"]').attr("rel","");
//Remove highslide effect:
jQuery('a.highslide').removeClass("highslide").attr("onclick","");
//Remove shutter effect:
jQuery('a[class^=shutterset]').removeClass (function (index, css) { return (css.match (/\bshutterset\S+/g) || []).join(' '); });
//Remove fancybox effect:
jQuery('a.fancybox').unbind('click.fb').addClass('nolightbox').removeClass('fancybox');
});
Thread Starter
Paul
(@paulcass82)
Sorry still no luck. This might have nothing to do with it but I’ve just realised when editing ngg-photoswipe.js is has (inactive) next to it. Is that just because I’m not viewing on a mobile device? I’m just wondering whether the ngg-photoswipe.js is being initialised before the fancybox js file so you could be trying to remove a class (.fancybox) before it’s even been added to the anchor. Sorry I’m a beginner please tell me if this makes no sense.
What you’re saying not only makes sense, it’s exactly the approach I’m using to prevent Fancybox from launching.
By the way, I’ve just tested your site and now it works: Fancybox doesn’t launch.
Have you tried clearing your cache?
Thread Starter
Paul
(@paulcass82)
Yes thank you so much 🙂 Will this change be built in to the next update?
I’ll think about it, but I’m still not sure.
After all, Fancybox is not built-in with NextGEN Gallery.
Anyway, why don’t you rate the plugin?
Thread Starter
Paul
(@paulcass82)
Yes I see your point but I would of thought there will be quite a few people that would benefit from this also. Obviously this is totally up to you and at least you have given me a workaround 🙂 Thanks again and yes I shall be giving it a 5 star rating!
Check the latest version 😉
Thread Starter
Paul
(@paulcass82)
Great thanks 🙂 At least now this means I won’t have to keep updating the JavaScript with the fix. Keep up the good work!