[Plugin: Flickr Mini Gallery] jQuery Conflict
-
I’ve discovered that the great plugin Flickr Mini Gallery conflicts with Lightbox Plus (and probably any other plugins that implement jQuery using the wp_enqueue_script(‘jquery’); method.
I took a look at the code and have created a hotfix for version 1.0 of Flick Mini Gallery.
Here’s how to fix the issue:
Download the file Flickr Mini Gallery Hot Fix
- Place flickr_mini_gallery.php in …/wp-content/plugins/flickr-mini-gallery directory.
- Place flickr_mini_gallery.php in …/wp-content/plugins/flickr-mini-gallery/js directory.
- That’s all. Now you shouldn’t have any jQuery conflicts anymore.
Here’s a break down of the changes:
Add these lines to your miniflickr.js file
At line 2 after initial comment:
jQuery(function($){
Add at end of file:
});
Replaced the
jquery_lightbox_scripts()
function inflickr_mini_gallery.php
with this://add jquery and lightbox function jquery_lightbox_scripts(){ $path = '/wp-content/plugins/flickr-mini-gallery/js'; wp_enqueue_script('jquery'); $opts = mfg_get_options(); $format = $opts['mfg_thumbformat']; echo '<script type="text/javascript"> var theblogurl ="'.get_bloginfo('url').'"; var flickr_mini_gallery_img_format ="'.$format.'"; </script>'; echo '<link rel="stylesheet" type="text/css" href="/wp-content/plugins/flickr-mini-gallery/css/jquery.lightbox-0.5.css" media="screen" />'; wp_enqueue_script('jquerylightbox', $path.'/jquery.lightbox-0.5.js', array('jquery'),'0.5'); wp_enqueue_script('miniflickr', $path.'/miniflickr.js', array('jquery'),'0.1'); }
https://www.ads-software.com/extend/plugins/flickr-mini-gallery/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: Flickr Mini Gallery] jQuery Conflict’ is closed to new replies.