clameurs.features.inc 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. 1 => array(
  59. 'name' => 'image_scale_and_crop',
  60. 'data' => array(
  61. 'width' => 300,
  62. 'height' => 160,
  63. ),
  64. 'weight' => -9,
  65. ),
  66. ),
  67. );
  68. // Exported image style: video_thumb_episode.
  69. $styles['video_thumb_episode'] = array(
  70. 'label' => 'video_thumb_episode',
  71. 'effects' => array(
  72. 14 => array(
  73. 'name' => 'image_scale_and_crop',
  74. 'data' => array(
  75. 'width' => 200,
  76. 'height' => 111,
  77. ),
  78. 'weight' => -9,
  79. ),
  80. ),
  81. );
  82. // Exported image style: video_thumb_themat.
  83. $styles['video_thumb_themat'] = array(
  84. 'label' => 'video_thumb_themat',
  85. 'effects' => array(
  86. 3 => array(
  87. 'name' => 'image_scale_and_crop',
  88. 'data' => array(
  89. 'width' => 760,
  90. 'height' => 428,
  91. ),
  92. 'weight' => -9,
  93. ),
  94. ),
  95. );
  96. return $styles;
  97. }
  98. /**
  99. * Implements hook_node_info().
  100. */
  101. function clameurs_node_info() {
  102. $items = array(
  103. 'documentair' => array(
  104. 'name' => t('Documentaire'),
  105. 'base' => 'node_content',
  106. 'description' => '',
  107. 'has_title' => '1',
  108. 'title_label' => t('Titre'),
  109. 'help' => '',
  110. ),
  111. 'episode' => array(
  112. 'name' => t('Épisode'),
  113. 'base' => 'node_content',
  114. 'description' => '',
  115. 'has_title' => '1',
  116. 'title_label' => t('Titre'),
  117. 'help' => '',
  118. ),
  119. 'thematique' => array(
  120. 'name' => t('Thematique'),
  121. 'base' => 'node_content',
  122. 'description' => '',
  123. 'has_title' => '1',
  124. 'title_label' => t('Titre'),
  125. 'help' => '',
  126. ),
  127. );
  128. drupal_alter('node_info', $items);
  129. return $items;
  130. }