WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery Optimizer
browse gallery pages reloads whole site (9 posts)

  1. bru-u-kno
    Member
    Posted 1 year ago #

    Hello people,

    every time I browse from gallery page 1 to an other it reloads the whole wordpress site. Here an example: http://www.basta-club.net/veranstaltungsreihen/goerlitzer-kantinenlesen

    I use NextGEN Gallery Optimizer and NextGEN Gallery Optimizer Premium.

    Is there an option to fix that problem, because it's irritating for users when they have to scroll down again to see the gallery page 2 and so on.

    Kindly regards,
    Bruno

    http://wordpress.org/extend/plugins/nextgen-gallery-optimizer/

  2. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Bruno,

    Thanks for using NextGEN Gallery Optimizer Premium!

    There's an AJAX pagination option in NextGEN Gallery that will let your users navigate between pages without page refreshes, however I've only added support for it in Optimizer Premium when using the [imagebrowser id=x] shortcode. This is due to NextGEN's implementation being too buggy, inconsistent and restrictive (re: the FAQ).

    You can find this setting at Gallery --> Options --> Gallery --> "Enable AJAX pagination", and you'll need to use the default "Shutter" lightbox effect for your images in order for it to work. This can be changed at Gallery --> Options --> Effects. If you find you're happy with this functionality (with Optimizer deactivated), just let me know and I'll code you up a custom modification that will load the extra scripts required for it to work on your gallery pages only.

    All the best,
    Mark.

  3. bru-u-kno
    Member
    Posted 1 year ago #

    When I use [imagebrowser id=x] shortcode + Enable AJAX pagination + Shutter lightbox effect, it displays the first image, but when I klick on the next button, it reloads the whole site and shows a new page with the message "Not Found - The page you were looking for is no longer available."

    Is there any way to load the [nggallery id=x] shortcode with ajax, because this is the only function I need.

  4. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Bruno,

    It sounds like there may be a conflict with another plugin, or a script in your theme. Would you be able to send me the URL of your imagebrowser page, at all? (I couldn't find NextGEN installed anywhere on the site linked to above).

    If you can [email moderated - please keep the support within the forum] email me your link, I'll troubleshoot the error and send you through a customized version of Optimizer Premium with support for AJAX pagination on the [nggallery id=x] shortcode.

    Many thanks,
    Mark.

  5. bru-u-kno
    Member
    Posted 1 year ago #

    please try again with the link above

  6. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Bruno,

    Thanks for updating the page.

    I believe your AJAX pagination isn't working because you still have Fancybox activated. If you first deactivate Fancybox on Optimizer's settings page, and then select "Shutter" at Gallery --> Options --> Effects, you should be all set!

    To get AJAX pagination working with Optimizer Premium on your [nggallery id=x] shortcodes, simply open nextgen-optimizer-premium-functions.php via FTP or Plugins --> Editor in your admin...

    And replace this section...

    if (isset($nggop_nextgen_options['thumbEffect']) && ($nggop_nextgen_options['thumbEffect'] == 'shutter')) {
    
    	// see scripts-and-styles.php for functions
    	add_action('wp_enqueue_scripts', 'nggop_load_shutter_scripts', 1000);
    	add_action('wp_print_styles', 'nggop_load_shutter_styles', 1000);
    	add_action('wp_head','nggop_shutter_inline_js', 1000);
    
    }

    With the following code...

    if (isset($nggop_nextgen_options['thumbEffect']) && ($nggop_nextgen_options['thumbEffect'] == 'shutter')) {
    
    	// see scripts-and-styles.php for functions
    	add_action('wp_enqueue_scripts', 'nggop_load_shutter_scripts', 1000);
    	add_action('wp_print_styles', 'nggop_load_shutter_styles', 1000);
    	add_action('wp_head','nggop_shutter_inline_js', 1000);
    
    	// add ajax pagination scripts to [nggallery id=x]...
    	// only runs if enabled at gallery --> options --> gallery --> "Enable AJAX pagination"
    	// requires shutter effect to work
    
    	if (isset($nggop_nextgen_options['galAjaxNav']) && ($nggop_nextgen_options['galAjaxNav'] == true)) {
    		add_action('wp_enqueue_scripts', 'nggop_load_jquery', 1000);
    		add_action('wp_enqueue_scripts', 'nggop_shutter_ajax_pagination_js', 1000);
    		add_action('wp_head','nggop_shutter_inline_ajax_pagination', 1000);
    
    		if (isset($nggop_options['jquery']) && ($nggop_options['jquery'] == 'google')) {
    			add_action('wp_head','nggop_jquery_no_conflict_inline_js', 1000);
    		}
    
    	}
    
    }

    NOTE: As mentioned in the FAQ, you'll want to keep NextGEN's [Show as slideshow] link deactivated...as it breaks when AJAX pagination is active.

    Hope this helps!

    Cheers,
    Mark.

  7. bru-u-kno
    Member
    Posted 1 year ago #

    Thanks for the instructions, now AJAX pagination works.

    Is it possible to enable Fancybox lightbox effect combined with AJAX pagenation?

  8. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Bruno,

    That's great to hear!

    I've been looking into modifying NextGEN's AJAX pagination to get it to work with Fancybox instead of the Shutter effect for you, and I believe it is possible, yes. It's quite involved however, and will require many changes/additions to both NextGEN and Optimizer, but I'll try to get that functionality ready for you out-of-the-box in the next release.

    All the best,
    Mark.

  9. bru-u-kno
    Member
    Posted 1 year ago #

    You are awesome Mark. Thanks in advance.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.