A_NextGen_Basic_Gallery_Mapper

Sets default values for the NextGen Basic Slideshow display type.

Defined (1)

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

/products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php  
  1. class A_NextGen_Basic_Gallery_Mapper extends Mixin 
  2. function set_defaults($entity) 
  3. $this->call_parent('set_defaults', $entity); 
  4. if (isset($entity->name)) { 
  5. if ($entity->name == NGG_BASIC_SLIDESHOW) { 
  6. $this->set_slideshow_defaults($entity); 
  7. } else { 
  8. if ($entity->name == NGG_BASIC_THUMBNAILS) { 
  9. $this->set_thumbnail_defaults($entity); 
  10. function set_slideshow_defaults($entity) 
  11. $settings = C_NextGen_Settings::get_instance(); 
  12. $this->object->_set_default_value($entity, 'settings', 'gallery_width', $settings->irWidth); 
  13. $this->object->_set_default_value($entity, 'settings', 'gallery_height', $settings->irHeight); 
  14. $this->object->_set_default_value($entity, 'settings', 'thumbnail_width', $settings->thumbwidth); 
  15. $this->object->_set_default_value($entity, 'settings', 'thumbnail_height', $settings->thumbheight); 
  16. $this->object->_set_default_value($entity, 'settings', 'cycle_interval', $settings->irRotatetime); 
  17. $this->object->_set_default_value($entity, 'settings', 'cycle_effect', $settings->slideFX); 
  18. $this->object->_set_default_value($entity, 'settings', 'effect_code', $settings->thumbCode); 
  19. $this->object->_set_default_value($entity, 'settings', 'show_thumbnail_link', $settings->galShowSlide ? 1 : 0); 
  20. $this->object->_set_default_value($entity, 'settings', 'thumbnail_link_text', $settings->galTextGallery); 
  21. $this->object->_set_default_value($entity, 'settings', 'template', ''); 
  22. // Part of the pro-modules 
  23. $this->object->_set_default_value($entity, 'settings', 'ngg_triggers_display', 'never'); 
  24. function set_thumbnail_defaults($entity) 
  25. $settings = C_NextGen_Settings::get_instance(); 
  26. $this->object->_set_default_value($entity, 'settings', 'images_per_page', $settings->galImages); 
  27. $this->object->_set_default_value($entity, 'settings', 'number_of_columns', $settings->galColumns); 
  28. $this->object->_set_default_value($entity, 'settings', 'thumbnail_width', $settings->thumbwidth); 
  29. $this->object->_set_default_value($entity, 'settings', 'thumbnail_height', $settings->thumbheight); 
  30. $this->object->_set_default_value($entity, 'settings', 'show_all_in_lightbox', $settings->galHiddenImg); 
  31. $this->object->_set_default_value($entity, 'settings', 'ajax_pagination', $settings->galAjaxNav); 
  32. $this->object->_set_default_value($entity, 'settings', 'use_imagebrowser_effect', $settings->galImgBrowser); 
  33. $this->object->_set_default_value($entity, 'settings', 'template', ''); 
  34. $this->object->_set_default_value($entity, 'settings', 'display_no_images_error', 1); 
  35. // TODO: Should this be called enable pagination? 
  36. $this->object->_set_default_value($entity, 'settings', 'disable_pagination', 0); 
  37. // Alternative view support 
  38. $this->object->_set_default_value($entity, 'settings', 'show_slideshow_link', $settings->galShowSlide ? 1 : 0); 
  39. $this->object->_set_default_value($entity, 'settings', 'slideshow_link_text', $settings->galTextSlide); 
  40. // override thumbnail settings 
  41. $this->object->_set_default_value($entity, 'settings', 'override_thumbnail_settings', 0); 
  42. $this->object->_set_default_value($entity, 'settings', 'thumbnail_quality', '100'); 
  43. $this->object->_set_default_value($entity, 'settings', 'thumbnail_crop', 1); 
  44. $this->object->_set_default_value($entity, 'settings', 'thumbnail_watermark', 0); 
  45. // Part of the pro-modules 
  46. $this->object->_set_default_value($entity, 'settings', 'ngg_triggers_display', 'never');