Mlix / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

find_gallery() to report the number of photos in the gallery #475

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi Alex,
could you please add the following line of code to find_gallery():

// get the counter value
$gallery->counter = intval( $wpdb->get_var($wpdb->prepare( "SELECT COUNT(*) as 
counter FROM $wpdb->nggpictures WHERE galleryid = %d", $id ) ) );

just above
wp_cache_add($id, $gallery, 'ngg_gallery');

This will allow ngg.getGallery to return the number of photos in the gallery.

Thanks!

What is the expected output? What do you see instead?

What WordPress / NextGEN Gallery version are you using? What browser are
you using?

Please provide any additional information below.

Original issue reported on code.google.com by v...@alloyphoto.com on 25 Feb 2012 at 2:59