M_Dynamic_Thumbnails

The NextGEN Gallery M Dynamic Thumbnails class.

Defined (1)

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

/products/photocrati_nextgen/modules/dynamic_thumbnails/module.dynamic_thumbnails.php  
  1. class M_Dynamic_Thumbnails extends C_Base_Module 
  2. function define($id = 'pope-module',  
  3. $name = 'Pope Module',  
  4. $description = '',  
  5. $version = '',  
  6. $uri = '',  
  7. $author = '',  
  8. $author_uri = '',  
  9. $context = FALSE) 
  10. parent::define( 
  11. 'photocrati-dynamic_thumbnails',  
  12. 'Dynamic Thumbnails',  
  13. 'Adds support for dynamic thumbnails',  
  14. '0.7',  
  15. 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',  
  16. 'Imagely',  
  17. 'https://www.imagely.com' 
  18. ); 
  19.  
  20. C_Photocrati_Installer::add_handler($this->module_id, 'C_Dynamic_Thumbnails_Installer'); 
  21.  
  22. function _register_adapters() 
  23. $this->get_registry()->add_adapter('I_GalleryStorage_Driver', 'A_Dynamic_Thumbnails_Storage_Driver'); 
  24.  
  25. function _register_utilities() 
  26. $this->get_registry()->add_utility('I_Dynamic_Thumbnails_Manager', 'C_Dynamic_Thumbnails_Manager'); 
  27. if (apply_filters('ngg_load_frontend_logic', TRUE, $this->module_id)) 
  28. $this->get_registry()->add_utility('I_Dynamic_Thumbnails_Controller', 'C_Dynamic_Thumbnails_Controller'); 
  29.  
  30. function _register_hooks() 
  31. add_action('ngg_routes', array(&$this, 'define_routes')); 
  32.  
  33. function define_routes($router) 
  34. $app = $router->create_app('/nextgen-image'); 
  35.  
  36. // The C_Dynamic_Thumbnails Controller was created before the new 
  37. // router implementation was conceptualized. It uses it's own mechanism 
  38. // to parse the REQUEST_URI. It should be refactored to use the router's 
  39. // parameter mechanism, but for now - we'll just removed the segments 
  40. // from the router's visibility, and let the Dynamic Thumbnails Controller 
  41. // do it's own parsing 
  42. $app->rewrite('/{*}', '/'); 
  43. $app->route('/', 'I_Dynamic_Thumbnails_Controller#index'); 
  44.  
  45. function get_type_list() 
  46. return array( 
  47. 'A_Dynamic_Thumbnails_Storage_Driver' => 'adapter.dynamic_thumbnails_storage_driver.php',  
  48. 'C_Dynamic_Thumbnails_Installer' => 'class.dynamic_thumbnails_installer.php',  
  49. 'C_Dynamic_Thumbnails_Controller' => 'class.dynamic_thumbnails_controller.php',  
  50. 'C_Dynamic_Thumbnails_Manager' => 'class.dynamic_thumbnails_manager.php' 
  51. );