materio_content_types.features.inc 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <?php
  2. /**
  3. * @file
  4. * materio_content_types.features.inc
  5. */
  6. /**
  7. * Implements hook_ctools_plugin_api().
  8. */
  9. function materio_content_types_ctools_plugin_api($module = NULL, $api = NULL) {
  10. if ($module == "cer" && $api == "default_cer_presets") {
  11. return array("version" => "1");
  12. }
  13. if ($module == "field_group" && $api == "field_group") {
  14. return array("version" => "1");
  15. }
  16. if ($module == "strongarm" && $api == "strongarm") {
  17. return array("version" => "1");
  18. }
  19. }
  20. /**
  21. * Implements hook_views_api().
  22. */
  23. function materio_content_types_views_api($module = NULL, $api = NULL) {
  24. return array("api" => "3.0");
  25. }
  26. /**
  27. * Implements hook_image_default_styles().
  28. */
  29. function materio_content_types_image_default_styles() {
  30. $styles = array();
  31. // Exported image style: card-big.
  32. $styles['card-big'] = array(
  33. 'name' => 'card-big',
  34. 'effects' => array(
  35. 3 => array(
  36. 'label' => 'Scale and crop',
  37. 'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
  38. 'effect callback' => 'image_scale_and_crop_effect',
  39. 'dimensions callback' => 'image_resize_dimensions',
  40. 'form callback' => 'image_resize_form',
  41. 'summary theme' => 'image_resize_summary',
  42. 'module' => 'image',
  43. 'name' => 'image_scale_and_crop',
  44. 'data' => array(
  45. 'width' => 430,
  46. 'height' => 340,
  47. ),
  48. 'weight' => 1,
  49. ),
  50. ),
  51. 'label' => 'card-big',
  52. );
  53. // Exported image style: card-full.
  54. $styles['card-full'] = array(
  55. 'name' => 'card-full',
  56. 'effects' => array(
  57. 4 => array(
  58. 'label' => 'Scale and crop',
  59. 'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
  60. 'effect callback' => 'image_scale_and_crop_effect',
  61. 'dimensions callback' => 'image_resize_dimensions',
  62. 'form callback' => 'image_resize_form',
  63. 'summary theme' => 'image_resize_summary',
  64. 'module' => 'image',
  65. 'name' => 'image_scale_and_crop',
  66. 'data' => array(
  67. 'width' => 425,
  68. 'height' => 610,
  69. ),
  70. 'weight' => 1,
  71. ),
  72. ),
  73. 'label' => 'card-full',
  74. );
  75. // Exported image style: card-medium.
  76. $styles['card-medium'] = array(
  77. 'name' => 'card-medium',
  78. 'effects' => array(
  79. 6 => array(
  80. 'label' => 'Scale and crop',
  81. 'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
  82. 'effect callback' => 'image_scale_and_crop_effect',
  83. 'dimensions callback' => 'image_resize_dimensions',
  84. 'form callback' => 'image_resize_form',
  85. 'summary theme' => 'image_resize_summary',
  86. 'module' => 'image',
  87. 'name' => 'image_scale_and_crop',
  88. 'data' => array(
  89. 'width' => 210,
  90. 'height' => 295,
  91. ),
  92. 'weight' => 1,
  93. ),
  94. ),
  95. 'label' => 'card-medium',
  96. );
  97. // Exported image style: card-small.
  98. $styles['card-small'] = array(
  99. 'name' => 'card-small',
  100. 'effects' => array(
  101. 2 => array(
  102. 'label' => 'Scale and crop',
  103. 'help' => 'Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.',
  104. 'effect callback' => 'image_scale_and_crop_effect',
  105. 'dimensions callback' => 'image_resize_dimensions',
  106. 'form callback' => 'image_resize_form',
  107. 'summary theme' => 'image_resize_summary',
  108. 'module' => 'image',
  109. 'name' => 'image_scale_and_crop',
  110. 'data' => array(
  111. 'width' => 100,
  112. 'height' => 140,
  113. ),
  114. 'weight' => 1,
  115. ),
  116. ),
  117. 'label' => 'card-small',
  118. );
  119. return $styles;
  120. }
  121. /**
  122. * Implements hook_node_info().
  123. */
  124. function materio_content_types_node_info() {
  125. $items = array(
  126. 'breve' => array(
  127. 'name' => t('Breve'),
  128. 'base' => 'node_content',
  129. 'description' => '',
  130. 'has_title' => '1',
  131. 'title_label' => t('Titre'),
  132. 'help' => '',
  133. ),
  134. 'company' => array(
  135. 'name' => t('Company'),
  136. 'base' => 'node_content',
  137. 'description' => '',
  138. 'has_title' => '1',
  139. 'title_label' => t('Company'),
  140. 'help' => '',
  141. ),
  142. 'materiau' => array(
  143. 'name' => t('Materiau'),
  144. 'base' => 'node_content',
  145. 'description' => '',
  146. 'has_title' => '1',
  147. 'title_label' => t('Nom'),
  148. 'help' => '',
  149. ),
  150. 'page' => array(
  151. 'name' => t('Page'),
  152. 'base' => 'node_content',
  153. 'description' => t('Use this content type to add static pages like "about" "contact" etc'),
  154. 'has_title' => '1',
  155. 'title_label' => t('Title'),
  156. 'help' => '',
  157. ),
  158. 'webform' => array(
  159. 'name' => t('Webform'),
  160. 'base' => 'node_content',
  161. 'description' => t('Create a new form or questionnaire accessible to users. Submission results and statistics are recorded and accessible to privileged users.'),
  162. 'has_title' => '1',
  163. 'title_label' => t('Title'),
  164. 'help' => '',
  165. ),
  166. );
  167. return $items;
  168. }