Ok, this fix is as follows:
All files to edit is relative to the “nextgen-gallery\products\photocrati_nextgen\modules\” directory.
Step 1: ‘nextgen_pagination/mixin.nextgen_basic_pagination.php’ around line 22:
Code that is currently there:
if (empty($current_url))
$current_url = $this->object->get_routed_url(TRUE);
Add below that:
$current_url_parts = explode('/',$current_url);
end($current_url_parts);
if(prev($current_url_parts) == 'page'){
array_pop($current_url_parts);
array_pop($current_url_parts);//remove the last two elements (page/#)
}//endif
$current_url = implode('/',$current_url_parts);
This will make sure that the pagination urls are correct.
Step 2: same file, 3 lines need changing:
Find
$this->object->set_param_for($current_url, 'page', $newpage)
Replace with
str_replace('/nggallery/','/',$this->object->set_param_for($current_url, 'page', $newpage))
This removes the ‘/nggallery/’ from the generated url (as nextgen does not give any images if it is present).
Step 3: ‘nextgen_gallery_display/class.displayed_gallery.php’ near line 595
Find
if ($limit && $offset)
Should be
if ($limit !== false && $offset !== false)
This allows the pagination and limit on an album’s first page (offset will be 0 which equates to false, thus we need to make sure that it really is false and not 0 using the Not Identical Operator).
Step 4: ‘nextgen_basic_album/adapter.nextgen_basic_album_controller.php’ near line 80:
Above the comment of line 78 add
$display_settings['galleries_per_page'] = 9;
9 Is the number of galleries/albums that may be displayed on a page
Below
$current_page = (int)$this->param('page', 1);
Add
$current_page = get_query_var('paged');
if($current_page == ''){ $current_page = 1; }
This gets the right variables to handle the current page
You are done. This should do the trick, without breaking anything, however I have only done basic testing to see if it breaks anything.
This is also a hack and not really a fix (due to the number of changes and overwriting of NextGen variables).
Unfortunately this does not enable ajax pagination, but this pagination is better than nothing.
I hope the development team will fix it in an update, but till then we either should not upgrade or re-implement this after each update.
I also hope this helped someone.