• 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

    1. Place flickr_mini_gallery.php in …/wp-content/plugins/flickr-mini-gallery directory.
    2. Place flickr_mini_gallery.php in …/wp-content/plugins/flickr-mini-gallery/js directory.
    3. 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 in flickr_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');
    }

    http://wordpress.org/extend/plugins/flickr-mini-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
  • thanks for the suggestions I’ve implemented them on the version 1.1 if you find any other bug please let me know

    Is there a way then to enable all lightbox functionality to be performed by a separate plugin then? e.g. flickr-mini-gallery handles building the Flickr gallery in WP, and then I can use my favorite lightbox variant to display the images in a modal window. dzappone, are you in fact doing that with both flickr-mini-gallery and lightbox plus?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Flickr Mini Gallery] jQuery Conflict’ is closed to new replies.