popsu_villes.features.inc 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. /**
  3. * @file
  4. * popsu_villes.features.inc
  5. */
  6. /**
  7. * Implements hook_ctools_plugin_api().
  8. */
  9. function popsu_villes_ctools_plugin_api() {
  10. list($module, $api) = func_get_args();
  11. if ($module == "boxes" && $api == "box") {
  12. return array("version" => "1");
  13. }
  14. list($module, $api) = func_get_args();
  15. if ($module == "context" && $api == "context") {
  16. return array("version" => "3");
  17. }
  18. list($module, $api) = func_get_args();
  19. if ($module == "field_group" && $api == "field_group") {
  20. return array("version" => "1");
  21. }
  22. list($module, $api) = func_get_args();
  23. if ($module == "page_manager" && $api == "pages_default") {
  24. return array("version" => "1");
  25. }
  26. list($module, $api) = func_get_args();
  27. if ($module == "strongarm" && $api == "strongarm") {
  28. return array("version" => "1");
  29. }
  30. }
  31. /**
  32. * Implements hook_views_api().
  33. */
  34. function popsu_villes_views_api() {
  35. return array("version" => "3.0");
  36. }
  37. /**
  38. * Implements hook_image_default_styles().
  39. */
  40. function popsu_villes_image_default_styles() {
  41. $styles = array();
  42. // Exported image style: popsu-villes-grande-image.
  43. $styles['popsu-villes-grande-image'] = array(
  44. 'name' => 'popsu-villes-grande-image',
  45. 'effects' => array(
  46. 2 => array(
  47. 'label' => 'Adaptive',
  48. 'help' => 'Adaptive image scale according to client resolution.',
  49. 'effect callback' => 'image_scale_effect',
  50. 'dimensions callback' => 'image_scale_dimensions',
  51. 'form callback' => 'adaptive_image_scale_form',
  52. 'summary theme' => 'adaptive_image_scale_summary',
  53. 'module' => 'adaptive_image',
  54. 'name' => 'adaptive_image',
  55. 'data' => array(
  56. 'resolutions' => '1382, 992, 768, 480',
  57. 'mobile_first' => 1,
  58. 'height' => '',
  59. 'width' => '1382',
  60. 'upscale' => '',
  61. ),
  62. 'weight' => '2',
  63. ),
  64. ),
  65. );
  66. // Exported image style: popsu-villes-listing-small.
  67. $styles['popsu-villes-listing-small'] = array(
  68. 'name' => 'popsu-villes-listing-small',
  69. 'effects' => array(
  70. 5 => array(
  71. 'label' => 'Mise à l’échelle et recadrage',
  72. 'help' => 'La mise à l\'échelle et le recadrage maintiendront les proportions originales de l\'image puis recadreront la dimension la plus large. C\'est très utile pour créer des vignettes carrées sans étirer les images.',
  73. 'effect callback' => 'image_scale_and_crop_effect',
  74. 'dimensions callback' => 'image_resize_dimensions',
  75. 'form callback' => 'image_resize_form',
  76. 'summary theme' => 'image_resize_summary',
  77. 'module' => 'image',
  78. 'name' => 'image_scale_and_crop',
  79. 'data' => array(
  80. 'width' => '101',
  81. 'height' => '87',
  82. ),
  83. 'weight' => '1',
  84. ),
  85. ),
  86. );
  87. return $styles;
  88. }
  89. /**
  90. * Implements hook_node_info().
  91. */
  92. function popsu_villes_node_info() {
  93. $items = array(
  94. 'popsu_ville' => array(
  95. 'name' => t('Fiche ville'),
  96. 'base' => 'node_content',
  97. 'description' => t('Ce type de contenu permet de créer la fiche de présentation d\'une ville pour un POPSU donné.'),
  98. 'has_title' => '1',
  99. 'title_label' => t('Nom de la ville'),
  100. 'help' => '',
  101. ),
  102. );
  103. return $items;
  104. }