WordPress.org

Ready to get started?Download WordPress

Forums

Lightbox Gallery
Perform the Lightbox Gallery (1 post)

  1. Philippe Gras
    Member
    Posted 11 months ago #

    Lightbox Gallery displays 1 CSS and 5 JS files more in the pages where it is enabled. I don't find another solution to decrease the number of requests than to hack the lightbox-gallery.php file, so :

    if ( !is_admin() && $flag ) :
    		wp_enqueue_script( 'jquery' );
    		if ( $options['global_settings']['lightbox_gallery_loading_type'] == 'highslide' ) :
    			wp_enqueue_script( 'highslide', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/highslide.js', false, '', $in_footer );
    		else :
    		/*******************************************************
    			wp_enqueue_script( 'dimensions', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.dimensions.js', array('jquery'), '', $in_footer );
    			wp_enqueue_script( 'bgiframe', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.bgiframe.js', array('jquery'), '', $in_footer ) ;
    			wp_enqueue_script( 'lightbox', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.lightbox.js', array('jquery'), '', $in_footer );
    			wp_enqueue_script( 'tooltip', '/' . PLUGINDIR . '/' . $plugin_dir . '/js/jquery.tooltip.js', array('jquery'), '', $in_footer );
    		 ******************************************************/
    		endif;
    			$template = get_template();
    			wp_enqueue_script( 'lightbox-gallery', '/wp-content/themes/' . $template . '/lightbox-gallery.js', array('jquery'), '', $in_footer );
    		/*******************************************************
    		if (@file_exists(TEMPLATEPATH.'/lightbox-gallery.js')) :
    			$template = get_template();
    			wp_enqueue_script( 'lightbox-gallery', '/wp-content/themes/' . $template . '/lightbox-gallery.js', array('jquery'), '', $in_footer );
    		else :
    			wp_enqueue_script( 'lightbox-gallery', '/' . PLUGINDIR . '/' . $plugin_dir . '/lightbox-gallery.js', array('jquery'), '', $in_footer );
    		endif;
    		 ******************************************************/
    	endif;

    I put also the Lightbox Gallery's style file in my template file, as suggested, and minify the four jQuery files in the head of lightbox-gallery.js file, as you may find here :
    http://www.vitecv.com/wp-content/themes/bp-crimson/lightbox-gallery.js

    Let me know if you find a problem in the lightbox gallery display :
    http://www.vitecv.com/actu/yahoo-pipes-offres-emploi/142287/
    And last but not least, if you see another trick without modifying the plugin's code !

    http://wordpress.org/extend/plugins/lightbox-gallery/

Reply

You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 11 months ago by Philippe Gras
  • This topic is not resolved
  • WordPress version: 3.1.4