Viewing 11 replies - 16 through 26 (of 26 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Set Table VI-B2 Linktype to lightbox

    Thread Starter daniish

    (@daniish)

    Brilliant, thank you ever so much ??

    Thread Starter daniish

    (@daniish)

    Sorry Jacob i have reopened this thread!

    I have noticed a glitch:

    When i click on a thumbnail in the masonry grid, it loads the thumbnail as a single image. Then if i click back in the browser and repeat by clicking on any thumbnail it then loads the prettyPhoto Lightbox for all subsequent images.

    You can see this here: https://www.globexposure.net/wales/?p=186

    How can i resolve this?

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    You hit another reason why i made my own lightbox…

    If you have any programming skills, please find out if there is a kind of initialisation function ( javascript ) in prettyPhoto Lightbox. If so, i can add a call to it when appropiate. That should fix it.

    Thread Starter daniish

    (@daniish)

    Hi Jacob,

    I have found the following initialisation code in the prettyphoto.js – hopefully this is what you need:

    /**
    		* Initialize prettyPhoto.
    		*/
    		$.prettyPhoto.initialize = function() {
    
    			settings = pp_settings;
    
    			if(settings.theme == 'pp_default') settings.horizontal_padding = 16;
    
    			// Find out if the picture is part of a set
    			theRel = $(this).attr(settings.hook);
    			galleryRegExp = /\[(?:.*)\]/;
    			isSet = (galleryRegExp.exec(theRel)) ? true : false;
    
    			// Put the SRCs, TITLEs, ALTs into an array.
    			pp_images = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return $(n).attr('href'); }) : $.makeArray($(this).attr('href'));
    			pp_titles = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(this).find('img').attr('alt'));
    			pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; }) : $.makeArray($(this).attr('title'));
    
    			if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false;
    
    			set_position = jQuery.inArray($(this).attr('href'), pp_images); // Define where in the array the clicked item is positionned
    			rel_index = (isSet) ? set_position : $("a["+settings.hook+"^='"+theRel+"']").index($(this));
    
    			_build_overlay(this); // Build the overlay {this} being the caller
    
    			if(settings.allow_resize)
    				$(window).bind('scroll.prettyphoto',function(){ _center_overlay(); });
    
    			$.prettyPhoto.open();
    
    			return false;
    		}
    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Try the following:

    Delete from the sever: ../wp-content/plugins/wp-photo-album-plus/wppa.min.js
    This causes the next time wppa.js to be loaded instead.

    Edit wppa.js

    Find around line 293:

    // On the fly init lightbox
    function wppaUpdateLightboxes() {
    
    	// Native wppa lightbox
    	if ( typeof( wppaInitOverlay ) == 'function' ) {
    		wppaInitOverlay();
    	}
    
    	// Lightbox-3
    	if ( typeof( myLightbox ) != 'undefined' ) {
    		if ( typeof( myLightbox.updateImageList ) == 'function' ) {
    			myLightbox.updateImageList();
    		}
    	}
    }

    and change it to:

    // On the fly init lightbox
    function wppaUpdateLightboxes() {
    
    	// Native wppa lightbox
    	if ( typeof( wppaInitOverlay ) == 'function' ) {
    		wppaInitOverlay();
    	}
    
    	// Lightbox-3
    	if ( typeof( myLightbox ) != 'undefined' ) {
    		if ( typeof( myLightbox.updateImageList ) == 'function' ) {
    			myLightbox.updateImageList();
    		}
    	}
    
    	// PrettyPhoto
    	if ( $ ) {
    		if ( $.prettyPhoto ) {
    			if ( $.prettyPhoto.initialize ) {
    				$.prettyPhoto.initialize();
    			}
    		}
    	}
    }

    I.e.: Add:

    // PrettyPhoto
    	if ( $ ) {
    		if ( $.prettyPhoto ) {
    			if ( $.prettyPhoto.initialize ) {
    				$.prettyPhoto.initialize();
    			}
    		}
    	}

    and see if it works

    Thread Starter daniish

    (@daniish)

    Unfortunately that has not worked and the problem persists. You can see the problem here on the July 2014 album: https://www.globexposure.net/wales/?p=5

    Do you have any other ideas?

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Yes, i have.

    Same with wppa-ajax-front.min.js : delete

    edit wppa-ajax-front.js line 47,48 reads:

    // If lightbox is on board, refresh the imagelist. It has just changed, you know!
    wppaUpdateLightboxes();

    change to

    // If lightbox is on board, refresh the imagelist. It has just changed, you know!
    setTimeout( 'wppaUpdateLightboxes()', 100 );

    Thread Starter daniish

    (@daniish)

    Thank you for trying Jacob, but i’m afraid that hasn’t worked either ??

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Fixed it after studying the code of prettyphoto myself.

    De-activate, delete and re-install wppa.
    Version is now 6.1.14.005 ( See top of settings page ).

    Also see my report on the prettyphoto forum

    Thread Starter daniish

    (@daniish)

    OMG Jacob you are prolific!!!

    Thank you soooo much for persevering, you really have gone above and beyond for me and i really do appreciate all your efforts..i’m so impressed :-))

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘PrettyPhoto Lightbox Grid Layout’ is closed to new replies.