nggCreateImageBrowser

Create an image browser from a list of image objects.

Description

nggCreateImageBrowser( $picturelist, (string) $template = '' ); 

Ngglegacy function

Parameters (2)

0. $picturelist
The picturelist.
1. $template — Optional. (string) => ''
The template.

Usage

  1. if ( !function_exists( 'nggCreateImageBrowser' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/module.nextgen_basic_imagebrowser.php'; 
  3.  
  4. // The picturelist. 
  5. $picturelist = null; 
  6.  
  7. // The template. 
  8. $template = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = nggCreateImageBrowser($picturelist, $template); 
  12.  

Defined (1)

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

/products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/module.nextgen_basic_imagebrowser.php  
  1. function nggCreateImageBrowser($picturelist, $template = '') 
  2. $renderer = C_Displayed_Gallery_Renderer::get_instance(); 
  3. $image_ids = array(); 
  4. foreach ($picturelist as $image) $image_ids[] = $image->pid; 
  5. return $renderer->display_images(array( 
  6. 'image_ids' => $image_ids,  
  7. 'display_type' => 'photocrati-nextgen_basic_imagebrowser',  
  8. 'template' => $template 
  9. ));