clameurs.features.inc 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. ),
  92. );
  93. // Exported image style: video_thumb_themat.
  94. $styles['video_thumb_themat'] = array(
  95. 'label' => 'video_thumb_themat',
  96. 'effects' => array(
  97. 8 => array(
  98. 'name' => 'image_scale_and_crop',
  99. 'data' => array(
  100. 'width' => 760,
  101. 'height' => 428,
  102. ),
  103. 'weight' => -9,
  104. ),
  105. 2 => array(
  106. 'name' => 'canvasactions_file2canvas',
  107. 'data' => array(
  108. 'xpos' => 'center',
  109. 'ypos' => 'center',
  110. 'alpha' => 90,
  111. 'scale' => '',
  112. 'path' => 'sites/all/themes/figureslibres/clameurs/images/video_overlay.png',
  113. ),
  114. 'weight' => -8,
  115. ),
  116. ),
  117. );
  118. return $styles;
  119. }
  120. /**
  121. * Implements hook_node_info().
  122. */
  123. function clameurs_node_info() {
  124. $items = array(
  125. 'documentair' => array(
  126. 'name' => t('Documentaire'),
  127. 'base' => 'node_content',
  128. 'description' => '',
  129. 'has_title' => '1',
  130. 'title_label' => t('Titre'),
  131. 'help' => '',
  132. ),
  133. 'episode' => array(
  134. 'name' => t('Épisode'),
  135. 'base' => 'node_content',
  136. 'description' => '',
  137. 'has_title' => '1',
  138. 'title_label' => t('Titre'),
  139. 'help' => '',
  140. ),
  141. 'thematique' => array(
  142. 'name' => t('Thematique'),
  143. 'base' => 'node_content',
  144. 'description' => '',
  145. 'has_title' => '1',
  146. 'title_label' => t('Titre'),
  147. 'help' => '',
  148. ),
  149. );
  150. drupal_alter('node_info', $items);
  151. return $items;
  152. }