Forums › Forums › Slimbox2 plugin › Problems with imageset with WP nextgen gallery
- This topic has 6 replies, 2 voices, and was last updated 14 years, 10 months ago by lemontea.
-
AuthorPosts
-
February 15, 2009 at 12:52 pm #638lemonteaMember
When the autoload feature is activated, the imageset in the nextgen gallery does not work. It only works when the autoload feature is disabled. I’m using
rel="lightbox-imagesetname"
Please advice. Thanks ” title=”Smiley” />
February 15, 2009 at 2:28 pm #5346lemonteaMemberI am using a temp fix by disabling the autoload feature so that nextgen gallery works. Then I use the add lightbox plugin (http://wordpress.org/extend/plugins/add-lightbox/) to add the rel link to other images so that it works "automatically".
I think the problem might be a conflict with the nextgen as nextgen also automatically inserts the rel link, so maybe when the autoload feature is enabled, something went wrong?
February 15, 2009 at 11:02 pm #5347malcalevakModeratorThis is something I’ve been trying to come up with an elegant solution for, though ultimately switching to my temporary solution is probably better than leaving it with it’s current solution which basically leaves you with either using rel="lightbox" or auto-loading on image links.
The problem with this fix, though, is that I believe it might occasionally create issues, though, where an image is picked up by two function calls, instead of just the one…
Dunno if that made any sense, your current solution is probably the best one for now, but if you want try it you could try this in the slimbox2_autoload.js.php:
Replace:
[code:2nzgnkqe]if (get_option(‘wp_slimbox_autoload’) == ‘on’)
$autoLoad = ‘$("a[href]").filter(function() {
return /.(jpg|png|gif)(?[dw=&]*)?$/i.test(this.href);
}).slimbox(‘.$options.’, null, function(el) {
return (this == el) || ($(this).parents("div.post, div#page")[0] && ($(this).parents("div.post, div#page")[0] == $(el).parents("div.post, div#page")[0]));
});’;
else
$autoLoad = ‘$("a[rel^‘lightbox’]").slimbox(‘.$options.’, null, function(el) {
return (this == el) || ((this.rel.length > && (this.rel == el.rel));
});
‘;[/code:2nzgnkqe]
with:
[code:2nzgnkqe]$autoLoad = ‘$("a[rel^‘lightbox’]").slimbox(‘.$options.’, null, function(el) {
return (this == el) || ((this.rel.length > && (this.rel == el.rel));
});
‘;
if (get_option(‘wp_slimbox_autoload’) == ‘on’)
$autoLoad .= ‘$("a[href]").filter(function() {
return /.(jpg|png|gif)(?[dw=&]*)?$/i.test(this.href);
}).slimbox(‘.$options.’, null, function(el) {
return (this == el) || ($(this).parents("div.post, div#page")[0] && ($(this).parents("div.post, div#page")[0] == $(el).parents("div.post, div#page")[0]));
});’;[/code:2nzgnkqe]
It may, however, create other issues.February 16, 2009 at 1:05 am #5348lemonteaMemberRight, so I shall stick with my temp fix by using the 2 plugins combined at the moment then until a fix has been created. Thank you. ” title=”Smiley” />
January 20, 2010 at 4:23 am #5349lemonteaMemberThis problem has been fixed in the latest version. Thank you so much! ” title=”Smiley” />
January 20, 2010 at 2:46 pm #5350malcalevakModeratorI’m glad it was fixed!
There’s a slight chance one of the fixes I just put into version 1.0.1 will break it again…if that’s the case, please let me know, as I think I now know how to fix it for you (using the new selector option).
January 20, 2010 at 3:07 pm #5351lemonteaMember^ I tested out the latest version of 1.0.1 with Next-Gen Gallery. It works perfectly fine, both gallery and posts. Thank you so much for the update!
By the way, thanks for taking the suggestion of using the a title tag as a caption as well. ” title=”Smiley” />
-
AuthorPosts
- You must be logged in to reply to this topic.