Advertisement
Guest User

nggGetGallery

a guest
Oct 4th, 2012
4,936
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1. function nggGetGallery( $galleryID, $template = '', $images = false ) {
  2.    
  3.     global $nggRewrite;
  4.  
  5.     $ngg_options = nggGallery::get_option('ngg_options');
  6.    
  7.     //Set sort order value, if not used (upgrade issue)
  8.     $ngg_options['galSort'] = ($ngg_options['galSort']) ? $ngg_options['galSort'] : 'pid';
  9.     $ngg_options['galSortDir'] = ($ngg_options['galSortDir'] == 'DESC') ? 'DESC' : 'ASC';
  10.    
  11.     // get gallery values
  12.     //TODO: Use pagination limits here to reduce memory needs
  13.     $picturelist = nggdb::get_gallery($galleryID, $ngg_options['galSort'], $ngg_options['galSortDir']);
  14.     return $picturelist;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement