clameurs.features.inc 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <?php
  2. /**
  3. * @file
  4. * clameurs.features.inc
  5. */
  6. /**
  7. * Implements hook_default_cer().
  8. */
  9. function clameurs_default_cer() {
  10. $items = array();
  11. $items['node:documentair:field_thematique*node:thematique:field_eclairages'] = entity_import('cer', '{
  12. "cer_bidirectional" : { "und" : [ { "value" : "1" } ] },
  13. "cer_enabled" : { "und" : [ { "value" : "1" } ] },
  14. "cer_left" : { "und" : [ { "path" : "node:documentair:field_thematique" } ] },
  15. "cer_right" : { "und" : [ { "path" : "node:thematique:field_eclairages" } ] },
  16. "cer_weight" : { "und" : [ { "value" : "0" } ] },
  17. "identifier" : "node:documentair:field_thematique*node:thematique:field_eclairages"
  18. }');
  19. $items['node:thematique:field_episodes*node:episode:field_thematique'] = entity_import('cer', '{
  20. "cer_bidirectional" : { "und" : [ { "value" : "1" } ] },
  21. "cer_enabled" : { "und" : [ { "value" : "1" } ] },
  22. "cer_left" : { "und" : [ { "path" : "node:thematique:field_episodes" } ] },
  23. "cer_right" : { "und" : [ { "path" : "node:episode:field_thematique" } ] },
  24. "cer_weight" : { "und" : [ { "value" : "0" } ] },
  25. "identifier" : "node:thematique:field_episodes*node:episode:field_thematique"
  26. }');
  27. return $items;
  28. }
  29. /**
  30. * Implements hook_ctools_plugin_api().
  31. */
  32. function clameurs_ctools_plugin_api($module = NULL, $api = NULL) {
  33. if ($module == "field_group" && $api == "field_group") {
  34. return array("version" => "1");
  35. }
  36. if ($module == "page_manager" && $api == "pages_default") {
  37. return array("version" => "1");
  38. }
  39. if ($module == "panels_mini" && $api == "panels_default") {
  40. return array("version" => "1");
  41. }
  42. if ($module == "strongarm" && $api == "strongarm") {
  43. return array("version" => "1");
  44. }
  45. if ($module == "video_embed_field" && $api == "default_video_embed_styles") {
  46. return array("version" => "1");
  47. }
  48. }
  49. /**
  50. * Implements hook_image_default_styles().
  51. */
  52. function clameurs_image_default_styles() {
  53. $styles = array();
  54. // Exported image style: video_thumb_docu.
  55. $styles['video_thumb_docu'] = array(
  56. 'label' => 'video_thumb_docu',
  57. 'effects' => array(
  58. 11 => array(
  59. 'name' => 'image_scale_and_crop',
  60. 'data' => array(
  61. 'width' => 300,
  62. 'height' => 160,
  63. ),
  64. 'weight' => -9,
  65. ),
  66. 10 => array(
  67. 'name' => 'canvasactions_file2canvas',
  68. 'data' => array(
  69. 'xpos' => 'center',
  70. 'ypos' => 'center',
  71. 'alpha' => 90,
  72. 'scale' => '',
  73. 'path' => 'sites/all/themes/figureslibres/clameurs/images/video_overlay.png',
  74. ),
  75. 'weight' => -8,
  76. ),
  77. ),
  78. );
  79. // Exported image style: video_thumb_episode.
  80. $styles['video_thumb_episode'] = array(
  81. 'label' => 'video_thumb_episode',
  82. 'effects' => array(
  83. 14 => array(
  84. 'name' => 'image_scale_and_crop',
  85. 'data' => array(
  86. 'width' => 200,
  87. 'height' => 111,
  88. ),
  89. 'weight' => -9,
  90. ),
  91. 13 => array(
  92. 'name' => 'canvasactions_file2canvas',
  93. 'data' => array(
  94. 'xpos' => 'center',
  95. 'ypos' => 'center',
  96. 'alpha' => 90,
  97. 'scale' => '',
  98. 'path' => 'sites/all/themes/figureslibres/clameurs/images/video_overlay.png',
  99. ),
  100. 'weight' => -8,
  101. ),
  102. ),
  103. );
  104. // Exported image style: video_thumb_themat.
  105. $styles['video_thumb_themat'] = array(
  106. 'label' => 'video_thumb_themat',
  107. 'effects' => array(
  108. 8 => array(
  109. 'name' => 'image_scale_and_crop',
  110. 'data' => array(
  111. 'width' => 760,
  112. 'height' => 428,
  113. ),
  114. 'weight' => -9,
  115. ),
  116. 2 => array(
  117. 'name' => 'canvasactions_file2canvas',
  118. 'data' => array(
  119. 'xpos' => 'center',
  120. 'ypos' => 'center',
  121. 'alpha' => 90,
  122. 'scale' => '',
  123. 'path' => 'sites/all/themes/figureslibres/clameurs/images/video_overlay.png',
  124. ),
  125. 'weight' => -8,
  126. ),
  127. ),
  128. );
  129. return $styles;
  130. }
  131. /**
  132. * Implements hook_node_info().
  133. */
  134. function clameurs_node_info() {
  135. $items = array(
  136. 'documentair' => array(
  137. 'name' => t('Documentaire'),
  138. 'base' => 'node_content',
  139. 'description' => '',
  140. 'has_title' => '1',
  141. 'title_label' => t('Titre'),
  142. 'help' => '',
  143. ),
  144. 'episode' => array(
  145. 'name' => t('Épisode'),
  146. 'base' => 'node_content',
  147. 'description' => '',
  148. 'has_title' => '1',
  149. 'title_label' => t('Titre'),
  150. 'help' => '',
  151. ),
  152. 'thematique' => array(
  153. 'name' => t('Thematique'),
  154. 'base' => 'node_content',
  155. 'description' => '',
  156. 'has_title' => '1',
  157. 'title_label' => t('Titre'),
  158. 'help' => '',
  159. ),
  160. );
  161. drupal_alter('node_info', $items);
  162. return $items;
  163. }