|
@@ -0,0 +1,216 @@
|
|
|
|
+<?php
|
|
|
|
+/**
|
|
|
|
+ * @file
|
|
|
|
+ * materio_rss.views_default.inc
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Implements hook_views_default_views().
|
|
|
|
+ */
|
|
|
|
+function materio_rss_views_default_views() {
|
|
|
|
+ $export = array();
|
|
|
|
+
|
|
|
|
+ $view = new view();
|
|
|
|
+ $view->name = 'actu_feed';
|
|
|
|
+ $view->description = '';
|
|
|
|
+ $view->tag = 'default';
|
|
|
|
+ $view->base_table = 'node';
|
|
|
|
+ $view->human_name = 'actu feed';
|
|
|
|
+ $view->core = 7;
|
|
|
|
+ $view->api_version = '3.0';
|
|
|
|
+ $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
|
|
|
|
+
|
|
|
|
+ /* Display: Master */
|
|
|
|
+ $handler = $view->new_display('default', 'Master', 'default');
|
|
|
|
+ $handler->display->display_options['title'] = 'materiO\'';
|
|
|
|
+ $handler->display->display_options['hide_admin_links'] = TRUE;
|
|
|
|
+ $handler->display->display_options['use_more_always'] = FALSE;
|
|
|
|
+ $handler->display->display_options['use_more_text'] = 'plus';
|
|
|
|
+ $handler->display->display_options['access']['type'] = 'perm';
|
|
|
|
+ $handler->display->display_options['cache']['type'] = 'none';
|
|
|
|
+ $handler->display->display_options['query']['type'] = 'views_query';
|
|
|
|
+ $handler->display->display_options['exposed_form']['type'] = 'basic';
|
|
|
|
+ $handler->display->display_options['exposed_form']['options']['submit_button'] = 'Appliquer';
|
|
|
|
+ $handler->display->display_options['exposed_form']['options']['reset_button_label'] = 'Réinitialiser';
|
|
|
|
+ $handler->display->display_options['exposed_form']['options']['exposed_sorts_label'] = 'Trier par';
|
|
|
|
+ $handler->display->display_options['pager']['type'] = 'some';
|
|
|
|
+ $handler->display->display_options['pager']['options']['items_per_page'] = '15';
|
|
|
|
+ $handler->display->display_options['style_plugin'] = 'default';
|
|
|
|
+ $handler->display->display_options['row_plugin'] = 'node';
|
|
|
|
+ $handler->display->display_options['row_options']['links'] = FALSE;
|
|
|
|
+ /* Champ: Contenu : Titre */
|
|
|
|
+ $handler->display->display_options['fields']['title_field']['id'] = 'title_field';
|
|
|
|
+ $handler->display->display_options['fields']['title_field']['table'] = 'field_data_title_field';
|
|
|
|
+ $handler->display->display_options['fields']['title_field']['field'] = 'title_field';
|
|
|
|
+ $handler->display->display_options['fields']['title_field']['label'] = '';
|
|
|
|
+ $handler->display->display_options['fields']['title_field']['element_label_colon'] = FALSE;
|
|
|
|
+ $handler->display->display_options['fields']['title_field']['link_to_entity'] = 1;
|
|
|
|
+ /* Champ: Contenu : video */
|
|
|
|
+ $handler->display->display_options['fields']['field_video_filter']['id'] = 'field_video_filter';
|
|
|
|
+ $handler->display->display_options['fields']['field_video_filter']['table'] = 'field_data_field_video_filter';
|
|
|
|
+ $handler->display->display_options['fields']['field_video_filter']['field'] = 'field_video_filter';
|
|
|
|
+ $handler->display->display_options['fields']['field_video_filter']['label'] = '';
|
|
|
|
+ $handler->display->display_options['fields']['field_video_filter']['element_label_colon'] = FALSE;
|
|
|
|
+ $handler->display->display_options['fields']['field_video_filter']['click_sort_column'] = 'url';
|
|
|
|
+ $handler->display->display_options['fields']['field_video_filter']['delta_offset'] = '0';
|
|
|
|
+ /* Champ: Contenu : Body */
|
|
|
|
+ $handler->display->display_options['fields']['body']['id'] = 'body';
|
|
|
|
+ $handler->display->display_options['fields']['body']['table'] = 'field_data_body';
|
|
|
|
+ $handler->display->display_options['fields']['body']['field'] = 'body';
|
|
|
|
+ $handler->display->display_options['fields']['body']['label'] = '';
|
|
|
|
+ $handler->display->display_options['fields']['body']['element_label_colon'] = FALSE;
|
|
|
|
+ /* Champ: Contenu : Image */
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel']['id'] = 'field_visuel';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel']['table'] = 'field_data_field_visuel';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel']['field'] = 'field_visuel';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel']['label'] = '';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel']['element_label_colon'] = FALSE;
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel']['hide_empty'] = TRUE;
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel']['click_sort_column'] = 'fid';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel']['type'] = 'media_content';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel']['settings'] = array(
|
|
|
|
+ 'image_style' => 'large',
|
|
|
|
+ 'group_multiple_values' => 0,
|
|
|
|
+ 'medium' => 'image',
|
|
|
|
+ 'expression' => 'full',
|
|
|
|
+ 'generate_hash' => 0,
|
|
|
|
+ 'hash_algo' => 'md5',
|
|
|
|
+ );
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel']['delta_limit'] = 'all';
|
|
|
|
+ /* Champ: Contenu : source */
|
|
|
|
+ $handler->display->display_options['fields']['field_source']['id'] = 'field_source';
|
|
|
|
+ $handler->display->display_options['fields']['field_source']['table'] = 'field_data_field_source';
|
|
|
|
+ $handler->display->display_options['fields']['field_source']['field'] = 'field_source';
|
|
|
|
+ $handler->display->display_options['fields']['field_source']['label'] = '';
|
|
|
|
+ $handler->display->display_options['fields']['field_source']['element_label_colon'] = FALSE;
|
|
|
|
+ $handler->display->display_options['fields']['field_source']['click_sort_column'] = 'url';
|
|
|
|
+ /* Champ: Contenu : Nœud UUID */
|
|
|
|
+ $handler->display->display_options['fields']['uuid']['id'] = 'uuid';
|
|
|
|
+ $handler->display->display_options['fields']['uuid']['table'] = 'node';
|
|
|
|
+ $handler->display->display_options['fields']['uuid']['field'] = 'uuid';
|
|
|
|
+ $handler->display->display_options['fields']['uuid']['label'] = '';
|
|
|
|
+ $handler->display->display_options['fields']['uuid']['exclude'] = TRUE;
|
|
|
|
+ $handler->display->display_options['fields']['uuid']['element_label_colon'] = FALSE;
|
|
|
|
+ /* Champ: Contenu : Date de mise à jour */
|
|
|
|
+ $handler->display->display_options['fields']['changed']['id'] = 'changed';
|
|
|
|
+ $handler->display->display_options['fields']['changed']['table'] = 'node';
|
|
|
|
+ $handler->display->display_options['fields']['changed']['field'] = 'changed';
|
|
|
|
+ $handler->display->display_options['fields']['changed']['label'] = '';
|
|
|
|
+ $handler->display->display_options['fields']['changed']['exclude'] = TRUE;
|
|
|
|
+ $handler->display->display_options['fields']['changed']['element_label_colon'] = FALSE;
|
|
|
|
+ $handler->display->display_options['fields']['changed']['date_format'] = 'long';
|
|
|
|
+ /* Champ: Contenu : Image */
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel_1']['id'] = 'field_visuel_1';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel_1']['table'] = 'field_data_field_visuel';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel_1']['field'] = 'field_visuel';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel_1']['label'] = 'Image thumb';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel_1']['exclude'] = TRUE;
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel_1']['click_sort_column'] = 'fid';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel_1']['type'] = 'media_thumbnail';
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel_1']['settings'] = array(
|
|
|
|
+ 'image_style' => 'thumbnail',
|
|
|
|
+ );
|
|
|
|
+ $handler->display->display_options['fields']['field_visuel_1']['delta_limit'] = 'all';
|
|
|
|
+ /* Critère de tri: Contenu : Date de publication */
|
|
|
|
+ $handler->display->display_options['sorts']['created']['id'] = 'created';
|
|
|
|
+ $handler->display->display_options['sorts']['created']['table'] = 'node';
|
|
|
|
+ $handler->display->display_options['sorts']['created']['field'] = 'created';
|
|
|
|
+ $handler->display->display_options['sorts']['created']['order'] = 'DESC';
|
|
|
|
+ /* Critère de filtrage: Contenu : Publié */
|
|
|
|
+ $handler->display->display_options['filters']['status']['id'] = 'status';
|
|
|
|
+ $handler->display->display_options['filters']['status']['table'] = 'node';
|
|
|
|
+ $handler->display->display_options['filters']['status']['field'] = 'status';
|
|
|
|
+ $handler->display->display_options['filters']['status']['value'] = 1;
|
|
|
|
+ $handler->display->display_options['filters']['status']['group'] = 1;
|
|
|
|
+ $handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;
|
|
|
|
+ /* Critère de filtrage: Contenu : Type */
|
|
|
|
+ $handler->display->display_options['filters']['type']['id'] = 'type';
|
|
|
|
+ $handler->display->display_options['filters']['type']['table'] = 'node';
|
|
|
|
+ $handler->display->display_options['filters']['type']['field'] = 'type';
|
|
|
|
+ $handler->display->display_options['filters']['type']['value'] = array(
|
|
|
|
+ 'breve' => 'breve',
|
|
|
|
+ );
|
|
|
|
+ $handler->display->display_options['filters']['type']['group'] = 1;
|
|
|
|
+ /* Critère de filtrage: Processus : État actuel */
|
|
|
|
+ $handler->display->display_options['filters']['sid']['id'] = 'sid';
|
|
|
|
+ $handler->display->display_options['filters']['sid']['table'] = 'workflow_node';
|
|
|
|
+ $handler->display->display_options['filters']['sid']['field'] = 'sid';
|
|
|
|
+ $handler->display->display_options['filters']['sid']['value'] = array(
|
|
|
|
+ 3 => '3',
|
|
|
|
+ );
|
|
|
|
+ $handler->display->display_options['filters']['sid']['group'] = 1;
|
|
|
|
+
|
|
|
|
+ /* Display: Feed */
|
|
|
|
+ $handler = $view->new_display('feed', 'Feed', 'feed');
|
|
|
|
+ $handler->display->display_options['pager']['type'] = 'none';
|
|
|
|
+ $handler->display->display_options['pager']['options']['offset'] = '0';
|
|
|
|
+ $handler->display->display_options['style_plugin'] = 'rss_fields';
|
|
|
|
+ $handler->display->display_options['style_options']['channel'] = array(
|
|
|
|
+ 'core' => array(
|
|
|
|
+ 'views_rss_core' => array(
|
|
|
|
+ 'description' => '',
|
|
|
|
+ 'language' => '',
|
|
|
|
+ 'category' => '',
|
|
|
|
+ 'image' => '',
|
|
|
|
+ 'copyright' => '©materio',
|
|
|
|
+ 'managingEditor' => '',
|
|
|
|
+ 'webMaster' => '',
|
|
|
|
+ 'generator' => '',
|
|
|
|
+ 'docs' => '',
|
|
|
|
+ 'cloud' => '',
|
|
|
|
+ 'ttl' => '',
|
|
|
|
+ 'skipHours' => '',
|
|
|
|
+ 'skipDays' => '',
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ );
|
|
|
|
+ $handler->display->display_options['style_options']['item'] = array(
|
|
|
|
+ 'core' => array(
|
|
|
|
+ 'views_rss_core' => array(
|
|
|
|
+ 'title' => 'title_field',
|
|
|
|
+ 'link' => 'title_field',
|
|
|
|
+ 'description' => 'body',
|
|
|
|
+ 'author' => '',
|
|
|
|
+ 'category' => '',
|
|
|
|
+ 'comments' => '',
|
|
|
|
+ 'enclosure' => 'field_visuel',
|
|
|
|
+ 'guid' => 'uuid',
|
|
|
|
+ 'pubDate' => 'changed',
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ 'media' => array(
|
|
|
|
+ 'views_rss_media' => array(
|
|
|
|
+ 'content' => 'field_visuel',
|
|
|
|
+ 'title' => 'title_field',
|
|
|
|
+ 'description' => '',
|
|
|
|
+ 'keywords' => '',
|
|
|
|
+ 'thumbnail' => 'field_visuel_1',
|
|
|
|
+ 'category' => '',
|
|
|
|
+ ),
|
|
|
|
+ ),
|
|
|
|
+ );
|
|
|
|
+ $handler->display->display_options['style_options']['feed_settings'] = array(
|
|
|
|
+ 'absolute_paths' => 1,
|
|
|
|
+ 'feed_in_links' => 0,
|
|
|
|
+ );
|
|
|
|
+ $handler->display->display_options['path'] = 'rss/feed';
|
|
|
|
+ $handler->display->display_options['displays'] = array(
|
|
|
|
+ 'default' => 0,
|
|
|
|
+ );
|
|
|
|
+ $handler->display->display_options['sitename_title'] = 0;
|
|
|
|
+ $translatables['actu_feed'] = array(
|
|
|
|
+ t('Master'),
|
|
|
|
+ t('materiO\''),
|
|
|
|
+ t('plus'),
|
|
|
|
+ t('Appliquer'),
|
|
|
|
+ t('Réinitialiser'),
|
|
|
|
+ t('Trier par'),
|
|
|
|
+ t('Asc'),
|
|
|
|
+ t('Desc'),
|
|
|
|
+ t('Image thumb'),
|
|
|
|
+ t('Feed'),
|
|
|
|
+ );
|
|
|
|
+ $export['actu_feed'] = $view;
|
|
|
|
+
|
|
|
|
+ return $export;
|
|
|
|
+}
|