nggShowGallery

Wrapper to I_Displayed_Gallery_Renderer->display_images(); this will display a basic thumbnails gallery.

Description

nggShowGallery( (int) $galleryID, (string) $template = '', (constant) $images_per_page = FALSE ); 

Parameters (3)

0. $galleryid (int)
The galleryid.
1. $template — Optional. (string) => ''
Path to template file
2. $images_per_page — Optional. (constant) => FALSE
Basic thumbnails setting

Usage

  1. if ( !function_exists( 'nggShowGallery' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php'; 
  3.  
  4. // The galleryid. 
  5. $galleryid = -1; 
  6.  
  7. // Path to template file 
  8. $template = ''; 
  9.  
  10. // Basic thumbnails setting 
  11. $images_per_page = FALSE; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = nggShowGallery($galleryid, $template, $images_per_page); 
  15.  

Defined (1)

The function is defined in the following location(s).

/products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php  
  1. function nggShowGallery($galleryID, $template = '', $images_per_page = FALSE) 
  2. $args = array( 
  3. 'source' => 'galleries',  
  4. 'container_ids' => $galleryID 
  5. ); 
  6.  
  7. if (apply_filters('ngg_show_imagebrowser_first', FALSE, $galleryID)) 
  8. $args['display_type'] = NGG_BASIC_IMAGEBROWSER
  9. else 
  10. $args['display_type'] = NGG_BASIC_THUMBNAILS
  11.  
  12. if (!empty($template)) 
  13. $args['template'] = $template; 
  14. if (!empty($images_per_page)) 
  15. $args['images_per_page'] = $images_per_page; 
  16.  
  17. echo C_Displayed_Gallery_Renderer::get_instance()->display_images($args);