clameurs.features.inc 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. 6 => array(
  59. 'name' => 'image_scale',
  60. 'data' => array(
  61. 'width' => 300,
  62. 'height' => 160,
  63. 'upscale' => 0,
  64. ),
  65. 'weight' => 1,
  66. ),
  67. 7 => array(
  68. 'name' => 'canvasactions_file2canvas',
  69. 'data' => array(
  70. 'xpos' => 'center',
  71. 'ypos' => 'center',
  72. 'alpha' => 90,
  73. 'scale' => '',
  74. 'path' => 'sites/all/themes/figureslibres/clameurs/images/video_overlay.png',
  75. ),
  76. 'weight' => 2,
  77. ),
  78. ),
  79. );
  80. // Exported image style: video_thumb_episode.
  81. $styles['video_thumb_episode'] = array(
  82. 'label' => 'video_thumb_episode',
  83. 'effects' => array(
  84. 8 => array(
  85. 'name' => 'image_scale',
  86. 'data' => array(
  87. 'width' => 200,
  88. 'height' => 111,
  89. 'upscale' => 0,
  90. ),
  91. 'weight' => 1,
  92. ),
  93. 9 => array(
  94. 'name' => 'canvasactions_file2canvas',
  95. 'data' => array(
  96. 'xpos' => 'center',
  97. 'ypos' => 'center',
  98. 'alpha' => 90,
  99. 'scale' => '',
  100. 'path' => 'sites/all/themes/figureslibres/clameurs/images/video_overlay.png',
  101. ),
  102. 'weight' => 2,
  103. ),
  104. ),
  105. );
  106. // Exported image style: video_thumb_themat.
  107. $styles['video_thumb_themat'] = array(
  108. 'label' => 'video_thumb_themat',
  109. 'effects' => array(
  110. 4 => array(
  111. 'name' => 'image_scale',
  112. 'data' => array(
  113. 'width' => 760,
  114. 'height' => 430,
  115. 'upscale' => 0,
  116. ),
  117. 'weight' => 1,
  118. ),
  119. 5 => array(
  120. 'name' => 'canvasactions_file2canvas',
  121. 'data' => array(
  122. 'xpos' => 'center',
  123. 'ypos' => 'center',
  124. 'alpha' => 90,
  125. 'scale' => '',
  126. 'path' => 'sites/all/themes/figureslibres/clameurs/images/video_overlay.png',
  127. ),
  128. 'weight' => 2,
  129. ),
  130. ),
  131. );
  132. return $styles;
  133. }
  134. /**
  135. * Implements hook_node_info().
  136. */
  137. function clameurs_node_info() {
  138. $items = array(
  139. 'documentair' => array(
  140. 'name' => t('Documentaire'),
  141. 'base' => 'node_content',
  142. 'description' => '',
  143. 'has_title' => '1',
  144. 'title_label' => t('Titre'),
  145. 'help' => '',
  146. ),
  147. 'episode' => array(
  148. 'name' => t('Épisode'),
  149. 'base' => 'node_content',
  150. 'description' => '',
  151. 'has_title' => '1',
  152. 'title_label' => t('Titre'),
  153. 'help' => '',
  154. ),
  155. 'thematique' => array(
  156. 'name' => t('Thematique'),
  157. 'base' => 'node_content',
  158. 'description' => '',
  159. 'has_title' => '1',
  160. 'title_label' => t('Titre'),
  161. 'help' => '',
  162. ),
  163. );
  164. drupal_alter('node_info', $items);
  165. return $items;
  166. }