materio_rss.views_default.inc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <?php
  2. /**
  3. * @file
  4. * materio_rss.views_default.inc
  5. */
  6. /**
  7. * Implements hook_views_default_views().
  8. */
  9. function materio_rss_views_default_views() {
  10. $export = array();
  11. $view = new view();
  12. $view->name = 'actu_feed';
  13. $view->description = '';
  14. $view->tag = 'default';
  15. $view->base_table = 'node';
  16. $view->human_name = 'actu feed';
  17. $view->core = 7;
  18. $view->api_version = '3.0';
  19. $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  20. /* Display: Master */
  21. $handler = $view->new_display('default', 'Master', 'default');
  22. $handler->display->display_options['title'] = 'materiO\'';
  23. $handler->display->display_options['hide_admin_links'] = TRUE;
  24. $handler->display->display_options['use_more_always'] = FALSE;
  25. $handler->display->display_options['use_more_text'] = 'plus';
  26. $handler->display->display_options['access']['type'] = 'perm';
  27. $handler->display->display_options['cache']['type'] = 'none';
  28. $handler->display->display_options['query']['type'] = 'views_query';
  29. $handler->display->display_options['exposed_form']['type'] = 'basic';
  30. $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Appliquer';
  31. $handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'Réinitialiser';
  32. $handler->display->display_options['exposed_form']['options']['exposed_sorts_label'] = 'Trier par';
  33. $handler->display->display_options['pager']['type'] = 'some';
  34. $handler->display->display_options['pager']['options']['items_per_page'] = '15';
  35. $handler->display->display_options['style_plugin'] = 'default';
  36. $handler->display->display_options['row_plugin'] = 'node';
  37. $handler->display->display_options['row_options']['links'] = FALSE;
  38. /* Champ: Contenu : Titre */
  39. $handler->display->display_options['fields']['title_field']['id'] = 'title_field';
  40. $handler->display->display_options['fields']['title_field']['table'] = 'field_data_title_field';
  41. $handler->display->display_options['fields']['title_field']['field'] = 'title_field';
  42. $handler->display->display_options['fields']['title_field']['label'] = '';
  43. $handler->display->display_options['fields']['title_field']['element_label_colon'] = FALSE;
  44. $handler->display->display_options['fields']['title_field']['link_to_entity'] = 1;
  45. /* Champ: Contenu : video */
  46. $handler->display->display_options['fields']['field_video_filter']['id'] = 'field_video_filter';
  47. $handler->display->display_options['fields']['field_video_filter']['table'] = 'field_data_field_video_filter';
  48. $handler->display->display_options['fields']['field_video_filter']['field'] = 'field_video_filter';
  49. $handler->display->display_options['fields']['field_video_filter']['label'] = '';
  50. $handler->display->display_options['fields']['field_video_filter']['element_label_colon'] = FALSE;
  51. $handler->display->display_options['fields']['field_video_filter']['click_sort_column'] = 'url';
  52. $handler->display->display_options['fields']['field_video_filter']['delta_offset'] = '0';
  53. /* Champ: Contenu : Body */
  54. $handler->display->display_options['fields']['body']['id'] = 'body';
  55. $handler->display->display_options['fields']['body']['table'] = 'field_data_body';
  56. $handler->display->display_options['fields']['body']['field'] = 'body';
  57. $handler->display->display_options['fields']['body']['label'] = '';
  58. $handler->display->display_options['fields']['body']['element_label_colon'] = FALSE;
  59. /* Champ: Contenu : Image */
  60. $handler->display->display_options['fields']['field_visuel']['id'] = 'field_visuel';
  61. $handler->display->display_options['fields']['field_visuel']['table'] = 'field_data_field_visuel';
  62. $handler->display->display_options['fields']['field_visuel']['field'] = 'field_visuel';
  63. $handler->display->display_options['fields']['field_visuel']['label'] = '';
  64. $handler->display->display_options['fields']['field_visuel']['element_label_colon'] = FALSE;
  65. $handler->display->display_options['fields']['field_visuel']['hide_empty'] = TRUE;
  66. $handler->display->display_options['fields']['field_visuel']['click_sort_column'] = 'fid';
  67. $handler->display->display_options['fields']['field_visuel']['type'] = 'media_content';
  68. $handler->display->display_options['fields']['field_visuel']['settings'] = array(
  69. 'image_style' => 'large',
  70. 'group_multiple_values' => 0,
  71. 'medium' => 'image',
  72. 'expression' => 'full',
  73. 'generate_hash' => 0,
  74. 'hash_algo' => 'md5',
  75. );
  76. $handler->display->display_options['fields']['field_visuel']['delta_limit'] = 'all';
  77. /* Champ: Contenu : source */
  78. $handler->display->display_options['fields']['field_source']['id'] = 'field_source';
  79. $handler->display->display_options['fields']['field_source']['table'] = 'field_data_field_source';
  80. $handler->display->display_options['fields']['field_source']['field'] = 'field_source';
  81. $handler->display->display_options['fields']['field_source']['label'] = '';
  82. $handler->display->display_options['fields']['field_source']['element_label_colon'] = FALSE;
  83. $handler->display->display_options['fields']['field_source']['click_sort_column'] = 'url';
  84. /* Champ: Contenu : Nœud UUID */
  85. $handler->display->display_options['fields']['uuid']['id'] = 'uuid';
  86. $handler->display->display_options['fields']['uuid']['table'] = 'node';
  87. $handler->display->display_options['fields']['uuid']['field'] = 'uuid';
  88. $handler->display->display_options['fields']['uuid']['label'] = '';
  89. $handler->display->display_options['fields']['uuid']['exclude'] = TRUE;
  90. $handler->display->display_options['fields']['uuid']['element_label_colon'] = FALSE;
  91. /* Champ: Contenu : Date de mise à jour */
  92. $handler->display->display_options['fields']['changed']['id'] = 'changed';
  93. $handler->display->display_options['fields']['changed']['table'] = 'node';
  94. $handler->display->display_options['fields']['changed']['field'] = 'changed';
  95. $handler->display->display_options['fields']['changed']['label'] = '';
  96. $handler->display->display_options['fields']['changed']['exclude'] = TRUE;
  97. $handler->display->display_options['fields']['changed']['element_label_colon'] = FALSE;
  98. $handler->display->display_options['fields']['changed']['date_format'] = 'long';
  99. /* Champ: Contenu : Image */
  100. $handler->display->display_options['fields']['field_visuel_1']['id'] = 'field_visuel_1';
  101. $handler->display->display_options['fields']['field_visuel_1']['table'] = 'field_data_field_visuel';
  102. $handler->display->display_options['fields']['field_visuel_1']['field'] = 'field_visuel';
  103. $handler->display->display_options['fields']['field_visuel_1']['label'] = 'Image thumb';
  104. $handler->display->display_options['fields']['field_visuel_1']['exclude'] = TRUE;
  105. $handler->display->display_options['fields']['field_visuel_1']['click_sort_column'] = 'fid';
  106. $handler->display->display_options['fields']['field_visuel_1']['type'] = 'media_thumbnail';
  107. $handler->display->display_options['fields']['field_visuel_1']['settings'] = array(
  108. 'image_style' => 'thumbnail',
  109. );
  110. $handler->display->display_options['fields']['field_visuel_1']['delta_limit'] = 'all';
  111. /* Critère de tri: Contenu : Date de publication */
  112. $handler->display->display_options['sorts']['created']['id'] = 'created';
  113. $handler->display->display_options['sorts']['created']['table'] = 'node';
  114. $handler->display->display_options['sorts']['created']['field'] = 'created';
  115. $handler->display->display_options['sorts']['created']['order'] = 'DESC';
  116. /* Critère de filtrage: Contenu : Publié */
  117. $handler->display->display_options['filters']['status']['id'] = 'status';
  118. $handler->display->display_options['filters']['status']['table'] = 'node';
  119. $handler->display->display_options['filters']['status']['field'] = 'status';
  120. $handler->display->display_options['filters']['status']['value'] = 1;
  121. $handler->display->display_options['filters']['status']['group'] = 1;
  122. $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
  123. /* Critère de filtrage: Contenu : Type */
  124. $handler->display->display_options['filters']['type']['id'] = 'type';
  125. $handler->display->display_options['filters']['type']['table'] = 'node';
  126. $handler->display->display_options['filters']['type']['field'] = 'type';
  127. $handler->display->display_options['filters']['type']['value'] = array(
  128. 'breve' => 'breve',
  129. );
  130. $handler->display->display_options['filters']['type']['group'] = 1;
  131. /* Critère de filtrage: Processus : État actuel */
  132. $handler->display->display_options['filters']['sid']['id'] = 'sid';
  133. $handler->display->display_options['filters']['sid']['table'] = 'workflow_node';
  134. $handler->display->display_options['filters']['sid']['field'] = 'sid';
  135. $handler->display->display_options['filters']['sid']['value'] = array(
  136. 3 => '3',
  137. );
  138. $handler->display->display_options['filters']['sid']['group'] = 1;
  139. /* Display: Feed */
  140. $handler = $view->new_display('feed', 'Feed', 'feed');
  141. $handler->display->display_options['pager']['type'] = 'none';
  142. $handler->display->display_options['pager']['options']['offset'] = '0';
  143. $handler->display->display_options['style_plugin'] = 'rss_fields';
  144. $handler->display->display_options['style_options']['channel'] = array(
  145. 'core' => array(
  146. 'views_rss_core' => array(
  147. 'description' => '',
  148. 'language' => '',
  149. 'category' => '',
  150. 'image' => '',
  151. 'copyright' => '©materio',
  152. 'managingEditor' => '',
  153. 'webMaster' => '',
  154. 'generator' => '',
  155. 'docs' => '',
  156. 'cloud' => '',
  157. 'ttl' => '',
  158. 'skipHours' => '',
  159. 'skipDays' => '',
  160. ),
  161. ),
  162. );
  163. $handler->display->display_options['style_options']['item'] = array(
  164. 'core' => array(
  165. 'views_rss_core' => array(
  166. 'title' => 'title_field',
  167. 'link' => 'title_field',
  168. 'description' => 'body',
  169. 'author' => '',
  170. 'category' => '',
  171. 'comments' => '',
  172. 'enclosure' => 'field_visuel',
  173. 'guid' => 'uuid',
  174. 'pubDate' => 'changed',
  175. ),
  176. ),
  177. 'media' => array(
  178. 'views_rss_media' => array(
  179. 'content' => 'field_visuel',
  180. 'title' => 'title_field',
  181. 'description' => '',
  182. 'keywords' => '',
  183. 'thumbnail' => 'field_visuel_1',
  184. 'category' => '',
  185. ),
  186. ),
  187. );
  188. $handler->display->display_options['style_options']['feed_settings'] = array(
  189. 'absolute_paths' => 1,
  190. 'feed_in_links' => 0,
  191. );
  192. $handler->display->display_options['path'] = 'rss/feed';
  193. $handler->display->display_options['displays'] = array(
  194. 'default' => 0,
  195. );
  196. $handler->display->display_options['sitename_title'] = 0;
  197. $translatables['actu_feed'] = array(
  198. t('Master'),
  199. t('materiO\''),
  200. t('plus'),
  201. t('Appliquer'),
  202. t('Réinitialiser'),
  203. t('Trier par'),
  204. t('Asc'),
  205. t('Desc'),
  206. t('Image thumb'),
  207. t('Feed'),
  208. );
  209. $export['actu_feed'] = $view;
  210. return $export;
  211. }