A_NextGen_Basic_Thumbnail_Form

Class A_NextGen_Basic_Thumbnail_Form.

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_Thumbnail_Form extends Mixin_Display_Type_Form 
  2. public function get_display_type_name() 
  3. return NGG_BASIC_THUMBNAILS; 
  4. /** 
  5. * Enqueues static resources required by this form 
  6. */ 
  7. public function enqueue_static_resources() 
  8. wp_enqueue_style('nextgen_basic_thumbnails_settings', $this->object->get_static_url('photocrati-nextgen_basic_gallery#thumbnails/nextgen_basic_thumbnails_settings.css'), FALSE, NGG_SCRIPT_VERSION); 
  9. wp_enqueue_script('nextgen_basic_thumbnails_settings', $this->object->get_static_url('photocrati-nextgen_basic_gallery#thumbnails/nextgen_basic_thumbnails_settings.js'), array('jquery.nextgen_radio_toggle'), NGG_SCRIPT_VERSION); 
  10. $atp = C_Attach_Controller::get_instance(); 
  11. if ($atp != null) { 
  12. $atp->mark_script('nextgen_basic_thumbnails_settings'); 
  13. /** 
  14. * Returns a list of fields to render on the settings page 
  15. */ 
  16. public function _get_field_names() 
  17. return array('thumbnail_override_settings', 'nextgen_basic_thumbnails_images_per_page', 'nextgen_basic_thumbnails_number_of_columns', 'nextgen_basic_thumbnails_ajax_pagination', 'nextgen_basic_thumbnails_hidden', 'nextgen_basic_thumbnails_imagebrowser_effect', 'nextgen_basic_thumbnails_show_slideshow_link', 'nextgen_basic_thumbnails_slideshow_link_text', 'nextgen_basic_templates_template'); 
  18. /** 
  19. * Renders the images_per_page settings field 
  20. * @param C_Display_Type $display_type 
  21. * @return string 
  22. */ 
  23. public function _render_nextgen_basic_thumbnails_images_per_page_field($display_type) 
  24. return $this->_render_number_field($display_type, 'images_per_page', __('Images per page', 'nggallery'), $display_type->settings['images_per_page'], __('0 will display all images at once', 'nggallery'), FALSE, '# of images', 0); 
  25. /** 
  26. * Renders the number_of_columns settings field 
  27. * @param C_Display_Type $display_type 
  28. * @return string 
  29. */ 
  30. public function _render_nextgen_basic_thumbnails_number_of_columns_field($display_type) 
  31. return $this->_render_number_field($display_type, 'number_of_columns', __('Number of columns to display', 'nggallery'), $display_type->settings['number_of_columns'], '', FALSE, __('# of columns', 'nggallery'), 0); 
  32. /** 
  33. * Renders the 'Add hidden images' settings field 
  34. * @param C_Display_Type $display_type 
  35. * @return string 
  36. */ 
  37. public function _render_nextgen_basic_thumbnails_hidden_field($display_type) 
  38. return $this->_render_radio_field($display_type, 'show_all_in_lightbox', __('Add Hidden Images', 'nggallery'), $display_type->settings['show_all_in_lightbox'], __('If pagination is used this option will show all images in the modal window (Thickbox, Lightbox etc.) This increases page load.', 'nggallery')); 
  39. public function _render_nextgen_basic_thumbnails_imagebrowser_effect_field($display_type) 
  40. return $this->_render_radio_field($display_type, 'use_imagebrowser_effect', __('Use imagebrowser effect', 'nggallery'), $display_type->settings['use_imagebrowser_effect'], __('When active each image in the gallery will link to an imagebrowser display and lightbox effects will not be applied.', 'nggallery')); 
  41. /** 
  42. * Renders the AJAX pagination settings field 
  43. * @param C_Display_Type $display_type 
  44. * @return string 
  45. */ 
  46. public function _render_nextgen_basic_thumbnails_ajax_pagination_field($display_type) 
  47. return $this->_render_radio_field($display_type, 'ajax_pagination', __('Enable AJAX pagination', 'nggallery'), $display_type->settings['ajax_pagination'], __('Browse images without reloading the page.', 'nggallery')); 
  48. /** 
  49. * Renders the show_slideshow_link settings field 
  50. * @param C_Display_Type $display_type 
  51. * @return string 
  52. */ 
  53. public function _render_nextgen_basic_thumbnails_show_slideshow_link_field($display_type) 
  54. return $this->_render_radio_field($display_type, 'show_slideshow_link', __('Show slideshow link', 'nggallery'), $display_type->settings['show_slideshow_link']); 
  55. /** 
  56. * Renders the slideshow_link_text settings field 
  57. * @param C_Display_Type $display_type 
  58. * @return string 
  59. */ 
  60. public function _render_nextgen_basic_thumbnails_slideshow_link_text_field($display_type) 
  61. return $this->_render_text_field($display_type, 'slideshow_link_text', __('Slideshow link text', 'nggallery'), $display_type->settings['slideshow_link_text'], '', !empty($display_type->settings['show_slideshow_link']) ? FALSE : TRUE);