Skip to content

Instantly share code, notes, and snippets.

@Squazz
Squazz / Most resent NextGen galleries
Last active August 29, 2015 14:10
The following code expects that the galleries are sorted manually.
global $nggdb;
$galleries = array();
$albumID = 1;
$album = $nggdb->find_album($albumID);
if($album) {
foreach( $album->gallery_ids as $galleryid ){
$gallery = $nggdb->find_gallery( $galleryid );
$image = $nggdb->find_image( $gallery->previewpic );