Benjamin
Forum Replies Created
-
Hi @odak71,
NextGEN has a newer internal API that is hopefully a little easier to work with. The following snippet will retrieve a gallery from the database:
$id = 4; $gallery_mapper = \Imagely\NGG\DataMappers\Gallery::get_instance(); $gallery = $gallery_mapper->find($id);
And to retrieve the images belonging to a gallery:
$image_mapper = \Imagely\NGG\DataMappers\Image::get_instance(); $images = $image_mapper->find_all_for_gallery($id, true);
I hope that helps.
Sorry everyone, 3.55 was a hotfix release with only one change. This will be resolved with the 3.56 release, which will probably be in early January. My apologies for the inconvenience!
Hi @karks88!
Sorry for the inconvenience, I did not intend to remove that constant! That ought to be fixed with the 3.55 release.
Thanks for letting us know!
Hello @dansart!
The search_for_galleries() method was removed because it was no longer used by NextGEN itself, and the 3.50 release was focused on removing legacy aspects that were no longer needed or necessary – my apologies for the inconvenience.
You can search the available galleries by keyword using your own search; how exactly depends on how you were using that method. I would recommend starting with something like this:
global $wpdb; $search_term = 'something'; // Trim quotes and whitespace $search_term = trim( $search_term, "\"'\n\r" ); $result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM
{$wpdb->nggallery}
WHEREtitle
LIKE %s ORgaldesc
LIKE %s ORDER BY title ASC", [ '%' . $wpdb->esc_like( $search_term ) . '%', '%' . $wpdb->esc_like( $search_term ) . '%', ] ) );Thanks @digifun, that will be fixed with the release of NextGEN 3.55.
Thanks for letting us know @gsfergusson! This will be fixed with NextGEN 3.55.
Thanks @sirrom56, I’ll have that fixed in NextGEN 3.55. Until then rolling back to NextGEN 3.41 will fix the problem.
Hi @palmtek! That’s probably my mistake that it wasn’t part of the 3.50 release, sorry about that. I’ve made a change that fixes that warning, and it will be part of 3.55.
Hoi @kingmaico, wat een leuke site!
Sorry voor de overlast! Het wordt opgelost met de volgende kleine release later vandaag of op zes december. Tot de tijd zal het gebruik van NextGEN 3.41 problemen voorkomen.
Hi @openmindculture!
You can change the display type settings programmatically by using NextGEN’s API, like so:
$mapper = C_Display_Type_Mapper::get_instance();
$display_type = $mapper->find_by_name(NGG_BASIC_THUMBNAILS);
$display_type->settings[‘ajax_pagination’] = ‘1’;
$mapper->save($display_type);That will find NextGEN’s custom post entry that stores the basic thumbnails attributes & settings, turn on the ajax pagination setting, and then save that entry back to the DB.
Due to legacy issues it’s best if you save boolean options as a string, such as ‘1’ for TRUE and ‘0’ for FALSE.
Let me know if you have any other questions!
Hi @mcaskill, thanks for bringing this to our attention!
That bit of code is definitely flawed. It looks like it was added in 2009 and hasn’t really changed at all since then. I have added this to my list of things to address; we should hopefully have an update in an upcoming NextGEN release.
Hallo @kvlwp!
I just checked and it appears that the print lab titles are not currently translatable; I will try to have this fixed soon.
Groeten,
Hi @mcaskill
Thanks for your feedback! How NextGEN handles routing is definitely in need of some work; it’s become a bit of a legacy from the early 2.0 days. My apologies for the difficulty it added to your project.
We are presently working on some major future changes to NextGEN that removes the framework that versions 2 & 3 were built on; the M_WordPress_Routing class will be renamed to Imagely\NGG\Util\Router eventually. We’re only just beginning alpha testing, but you can see the new routing file at https://github.com/imagely/nextgen-gallery/blob/35-remove-pope/src/Util/Router.php
NextGEN is compatible with PHP 8.0 – 8.2. There are some warnings and notices that will be generated by PHP 8, but they do not cause any actual issues (they are just notices of PHP features that will eventually be removed) and will be resolved in a future release.
Sorry about that, the latest version of Composer generates an autoload file that is incompatible with PHP 5.6
The latest version of NextGEN released today (3.35) fixes the issue.