Want more features on Pastebin? Sign Up, it's FREE!
Guest

nggGetGallery

By: a guest on Oct 4th, 2012  |  syntax: PHP  |  size: 0.63 KB  |  views: 3,343  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data