Put this in views_debugging.module in your modules/views_debugging directory: /** * Implementation of hook_views_api(). */ function views_debugging_views_api() { return array( 'api' => 2, 'path' => drupal_get_path('module', 'views_debugging'), //'path' => drupal_get_path('module', 'views_debugging') . '/includes', ); } Put this in views_debugging.views_default.inc in your modules/views_debugging directory or modules/views_debugging/includes directory: /** * Implementation of hook_views_default_views(). */ function views_debugging_views_default_views() { $view = new view; $view->name = 'popular'; $view->description = 'Shows the most-viewed nodes on the site. This requires the statistics to be enabled at administer >> reports >> access log settings.'; $view->tag = 'default'; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('fields', array( 'type' => array( 'label' => 'Tipo', 'link_to_node' => 0, 'exclude' => 1, 'id' => 'type', 'table' => 'node', 'field' => 'type', 'relationship' => 'none', ), 'title' => array( 'id' => 'title', 'table' => 'node', 'field' => 'title', 'label' => 'Title', 'link_to_node' => TRUE, ), 'name' => array( 'id' => 'name', 'table' => 'users', 'field' => 'name', 'label' => 'Author', 'link_to_user' => TRUE, ), )); $handler->override_option('sorts', array( 'totalcount' => array( 'order' => 'ASC', 'id' => 'totalcount', 'table' => 'node_counter', 'field' => 'totalcount', 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'status' => array( 'id' => 'status', 'table' => 'node', 'field' => 'status', 'operator' => '=', 'value' => '1', 'group' => 0, 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), ), 'totalcount' => array( 'operator' => '>', 'value' => array( 'value' => '0', 'min' => '', 'max' => '', ), 'group' => 0, 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'totalcount', 'table' => 'node_counter', 'field' => 'totalcount', 'relationship' => 'none', 'override' => array( 'button' => 'Override', ), ), 'type' => array( 'operator' => 'in', 'value' => array( 'story' => 'story', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'type', 'table' => 'node', 'field' => 'type', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', 'role' => array(), 'perm' => '', )); $handler->override_option('title', 'Articoli da scoprire'); $handler->override_option('items_per_page', '25'); $handler->override_option('use_pager', TRUE); $handler->override_option('use_more', 0); $handler->override_option('style_plugin', 'table'); $handler->override_option('style_options', array( 'override' => 0, 'order' => 'desc', 'columns' => array( 'type' => 'type', 'title' => 'title', 'name' => 'name', 'timestamp' => 'title', 'totalcount' => 'totalcount', ), 'info' => array( 'type' => array( 'sortable' => 0, 'separator' => '', ), 'title' => array( 'sortable' => 0, 'separator' => '', ), 'name' => array( 'sortable' => 0, 'separator' => '', ), 'timestamp' => array( 'separator' => '', ), 'totalcount' => array( 'sortable' => 0, 'separator' => '', ), ), 'default' => '-1', )); $handler = $view->new_display('page', 'Popular (page)', 'page'); $handler->override_option('path', 'popular/all'); $handler->override_option('menu', array( 'type' => 'default tab', 'title' => 'Popular content', 'weight' => '-1', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'normal', 'title' => 'Popular content', 'weight' => '', )); $handler = $view->new_display('page', 'Today (page)', 'page_1'); $handler->override_option('fields', array( 'type' => array( 'id' => 'type', 'table' => 'node', 'field' => 'type', 'label' => 'Type', ), 'title' => array( 'id' => 'title', 'table' => 'node', 'field' => 'title', 'label' => 'Title', 'link_to_node' => TRUE, ), 'name' => array( 'id' => 'name', 'table' => 'users', 'field' => 'name', 'label' => 'Author', 'link_to_user' => TRUE, ), 'timestamp' => array( 'id' => 'timestamp', 'table' => 'history_user', 'field' => 'timestamp', 'label' => '', 'comments' => 1, 'relationship' => 'none', 'link_to_node' => 0, 'comment' => 1, ), 'daycount' => array( 'id' => 'daycount', 'table' => 'node_counter', 'field' => 'daycount', 'label' => 'Views today', 'set_precision' => FALSE, 'precision' => 0, 'decimal' => '.', 'separator' => ',', 'prefix' => '', 'suffix' => '', 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'daycount' => array( 'id' => 'daycount', 'table' => 'node_counter', 'field' => 'daycount', 'order' => 'DESC', 'relationship' => 'none', ), )); $handler->override_option('path', 'popular/today'); $handler->override_option('menu', array( 'type' => 'tab', 'title' => 'Today\'s popular content', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'normal', 'title' => 'Popular content', 'weight' => '0', )); $handler = $view->new_display('block', 'Popular (block)', 'block'); $handler->override_option('fields', array( 'title' => array( 'id' => 'title', 'table' => 'node', 'field' => 'title', 'label' => '', 'link_to_node' => 1, 'relationship' => 'none', ), )); $handler->override_option('items_per_page', 3); $handler->override_option('use_pager', FALSE); $handler->override_option('style_plugin', 'list'); $handler->override_option('style_options', array( 'grouping' => '', 'type' => 'ul', )); $handler->override_option('row_options', array( 'inline' => array( 'title' => 'title', 'totalcount' => 'totalcount', ), 'separator' => '', )); $handler->override_option('block_description', 'Contenuti più visti'); $handler->override_option('block_caching', -1); $handler = $view->new_display('block', 'Today (block)', 'block_1'); $handler->override_option('fields', array( 'title' => array( 'id' => 'title', 'table' => 'node', 'field' => 'title', 'label' => '', 'link_to_node' => 1, 'relationship' => 'none', ), 'daycount' => array( 'id' => 'daycount', 'table' => 'node_counter', 'field' => 'daycount', 'label' => '', 'set_precision' => FALSE, 'precision' => 0, 'decimal' => '.', 'separator' => ',', 'prefix' => ' (', 'suffix' => ')', 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'daycount' => array( 'id' => 'daycount', 'table' => 'node_counter', 'field' => 'daycount', 'order' => 'DESC', 'relationship' => 'none', ), )); $handler->override_option('title', 'Today\'s popular content'); $handler->override_option('items_per_page', 5); $handler->override_option('use_pager', FALSE); $handler->override_option('link_display', 'page_1'); $handler->override_option('style_plugin', 'list'); $handler->override_option('style_options', array( 'type' => 'ul', )); $handler->override_option('row_options', array( 'inline' => array( 'title' => 'title', 'daycount' => 'daycount', ), 'separator' => '', )); $handler->override_option('block_description', 'Today\'s popular content'); $handler->override_option('block_caching', -1); $handler = $view->new_display('block', 'Blocco', 'block_2'); $handler->override_option('block_description', ''); $handler->override_option('block_caching', -1); $views[$view->name] = $view; $view = new view; $view->name = 'taxonomy_term'; $view->description = 'A view to emulate Drupal core\'s handling of taxonomy/term; it also emulates Views 1\'s handling by having two possible feeds.'; $view->tag = 'default'; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('fields', array( 'name' => array( 'label' => '', 'link_to_taxonomy' => 1, 'exclude' => 1, 'id' => 'name', 'table' => 'term_data', 'field' => 'name', 'relationship' => 'none', ), 'tid' => array( 'label' => '', 'type' => 'ol', 'separator' => ', ', 'empty' => '', 'link_to_taxonomy' => 1, 'limit' => 1, 'vids' => array( '2' => 2, '1' => 0, '4' => 0, '3' => 0, ), 'exclude' => 0, 'id' => 'tid', 'table' => 'term_node', 'field' => 'tid', 'relationship' => 'none', ), 'title' => array( 'label' => '', 'link_to_node' => 1, 'exclude' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'name' => array( 'order' => 'ASC', 'id' => 'name', 'table' => 'term_data', 'field' => 'name', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), )); $handler->override_option('arguments', array( 'term_node_tid_depth' => array( 'default_action' => 'empty', 'style_plugin' => 'default_summary', 'style_options' => array( 'count' => TRUE, 'override' => FALSE, 'items_per_page' => 25, ), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '%1', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'taxonomy_term', 'validate_fail' => 'empty', 'depth' => '-1', 'break_phrase' => 1, 'set_breadcrumb' => 1, 'id' => 'term_node_tid_depth', 'table' => 'node', 'field' => 'term_node_tid_depth', 'relationship' => 'none', 'default_argument_fixed' => '', 'default_argument_php' => '', 'validate_argument_node_type' => array( 'forum' => 0, 'page' => 0, 'story' => 0, ), 'validate_argument_vocabulary' => array( '2' => 2, '1' => 0, '4' => 0, '3' => 0, ), 'validate_argument_type' => 'tids', 'validate_argument_php' => '', 'override' => array( 'button' => 'Override', ), 'default_options_div_prefix' => '', 'default_argument_user' => 0, 'validate_argument_node_access' => 0, 'validate_argument_nid_type' => 'nid', ), 'term_node_tid_depth_1' => array( 'default_action' => 'empty', 'style_plugin' => 'default_summary', 'style_options' => array(), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '%3', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'taxonomy_term', 'validate_fail' => 'ignore', 'depth' => '0', 'break_phrase' => 1, 'set_breadcrumb' => 1, 'id' => 'term_node_tid_depth_1', 'table' => 'node', 'field' => 'term_node_tid_depth', 'relationship' => 'none', 'default_options_div_prefix' => '', 'default_argument_user' => 0, 'default_argument_fixed' => '', 'default_argument_php' => '', 'validate_argument_node_type' => array( 'forum' => 0, 'page' => 0, 'story' => 0, ), 'validate_argument_node_access' => 0, 'validate_argument_nid_type' => 'nid', 'validate_argument_vocabulary' => array( '2' => 2, '1' => 0, '4' => 0, '3' => 0, ), 'validate_argument_type' => 'name', 'validate_argument_php' => '', ), )); $handler->override_option('filters', array( 'type' => array( 'operator' => 'in', 'value' => array( 'story' => 'story', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'type', 'table' => 'node', 'field' => 'type', 'relationship' => 'none', ), 'vid' => array( 'operator' => 'in', 'value' => array( '4' => '4', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'vid', 'table' => 'term_data', 'field' => 'vid', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', 'role' => array(), 'perm' => '', )); $handler->override_option('items_per_page', 20); $handler->override_option('use_pager', '1'); $handler->override_option('style_plugin', 'list'); $handler->override_option('style_options', array( 'type' => 'ul', )); $handler->override_option('row_options', array( 'inline' => array( 'tid' => 'tid', 'title' => 'title', ), 'separator' => '', )); $handler = $view->new_display('page', 'Page', 'page'); $handler->override_option('path', 'taxonomy/term/%'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler = $view->new_display('feed', 'Core feed', 'feed'); $handler->override_option('items_per_page', 15); $handler->override_option('style_plugin', 'rss'); $handler->override_option('style_options', array( 'mission_description' => FALSE, 'description' => '', )); $handler->override_option('row_plugin', 'node_rss'); $handler->override_option('row_options', array( 'item_length' => 'default', )); $handler->override_option('path', 'taxonomy/term/%/%/feed'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler->override_option('displays', array( 'page' => 'page', 'default' => 0, )); $handler->override_option('sitename_title', FALSE); $handler = $view->new_display('feed', 'Views 1 feed', 'feed_1'); $handler->override_option('items_per_page', 15); $handler->override_option('style_plugin', 'rss'); $handler->override_option('style_options', array( 'mission_description' => FALSE, 'description' => '', )); $handler->override_option('row_plugin', 'node_rss'); $handler->override_option('row_options', array( 'item_length' => 'default', )); $handler->override_option('path', 'taxonomy/term/%/feed'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler->override_option('displays', array()); $handler->override_option('sitename_title', FALSE); $handler = $view->new_display('page', 'Pagina', 'page_1'); $handler->override_option('arguments', array( 'term_node_tid_depth' => array( 'default_action' => 'not found', 'style_plugin' => 'default_summary', 'style_options' => array( 'count' => TRUE, 'override' => FALSE, 'items_per_page' => 25, ), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '%1', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'taxonomy_term', 'validate_fail' => 'ignore', 'depth' => '0', 'break_phrase' => 1, 'set_breadcrumb' => 1, 'id' => 'term_node_tid_depth', 'table' => 'node', 'field' => 'term_node_tid_depth', 'relationship' => 'none', 'default_argument_fixed' => '', 'default_argument_php' => '', 'validate_argument_node_type' => array( 'forum' => 0, 'page' => 0, 'story' => 0, ), 'validate_argument_vocabulary' => array( '2' => 2, '1' => 0, '4' => 0, '3' => 0, ), 'validate_argument_type' => 'tids', 'validate_argument_php' => '', 'override' => array( 'button' => 'Override', ), 'default_options_div_prefix' => '', 'default_argument_user' => 0, 'validate_argument_node_access' => 0, 'validate_argument_nid_type' => 'nid', ), 'term_node_tid_depth_modifier' => array( 'id' => 'term_node_tid_depth_modifier', 'table' => 'node', 'field' => 'term_node_tid_depth_modifier', 'default_action' => 'ignore', 'style_plugin' => 'default_summary', 'style_options' => array( 'count' => TRUE, 'override' => FALSE, 'items_per_page' => 25, ), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'none', 'validate_fail' => 'not found', ), )); $handler->override_option('path', 'indicegeografico'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $views[$view->name] = $view; $view = new view; $view->name = 'indice_per_anno'; $view->description = 'Indice articoli per anno'; $view->tag = 'default'; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('fields', array( 'name' => array( 'label' => '', 'link_to_taxonomy' => 1, 'exclude' => 0, 'id' => 'name', 'table' => 'term_data', 'field' => 'name', 'relationship' => 'none', 'override' => array( 'button' => 'Override', ), ), 'tid' => array( 'label' => '', 'type' => 'separator', 'separator' => ': ', 'empty' => '', 'link_to_taxonomy' => 1, 'limit' => 1, 'vids' => array( '2' => 2, '1' => 0, '4' => 0, '3' => 0, ), 'exclude' => 0, 'id' => 'tid', 'table' => 'term_node', 'field' => 'tid', 'relationship' => 'none', 'override' => array( 'button' => 'Override', ), ), 'title' => array( 'label' => '', 'link_to_node' => 1, 'exclude' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'none', 'override' => array( 'button' => 'Override', ), ), )); $handler->override_option('sorts', array( 'name' => array( 'order' => 'ASC', 'id' => 'name', 'table' => 'term_data', 'field' => 'name', 'override' => array( 'button' => 'Override', ), 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'type' => array( 'operator' => 'in', 'value' => array( 'story' => 'story', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'type', 'table' => 'node', 'field' => 'type', 'relationship' => 'none', ), 'vid' => array( 'operator' => 'in', 'value' => array( '4' => '4', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'vid', 'table' => 'term_data', 'field' => 'vid', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', 'role' => array(), 'perm' => '', )); $handler->override_option('title', 'Indice cronologico di StoriaFse.net'); $handler->override_option('items_per_page', 20); $handler->override_option('use_pager', '1'); $handler->override_option('link_display', 'page_1'); $handler->override_option('style_plugin', 'list'); $handler->override_option('style_options', array( 'grouping' => 'name', 'type' => 'ul', )); $handler->override_option('row_options', array( 'inline' => array( 'tid' => 'tid', 'title' => 'title', ), 'separator' => '', )); $handler = $view->new_display('page', 'Page', 'page'); $handler->override_option('path', 'indicecronologico'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler = $view->new_display('feed', 'Core feed', 'feed'); $handler->override_option('items_per_page', 15); $handler->override_option('use_pager', FALSE); $handler->override_option('style_plugin', 'rss'); $handler->override_option('style_options', array( 'mission_description' => FALSE, 'description' => '', )); $handler->override_option('row_plugin', 'node_rss'); $handler->override_option('row_options', array( 'item_length' => 'default', )); $handler->override_option('path', 'taxonomy/term/%/%/feed'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler->override_option('displays', array( 'page' => 'page', 'default' => 0, )); $handler->override_option('sitename_title', FALSE); $handler = $view->new_display('feed', 'Views 1 feed', 'feed_1'); $handler->override_option('items_per_page', 15); $handler->override_option('use_pager', FALSE); $handler->override_option('style_plugin', 'rss'); $handler->override_option('style_options', array( 'mission_description' => FALSE, 'description' => '', )); $handler->override_option('row_plugin', 'node_rss'); $handler->override_option('row_options', array( 'item_length' => 'default', )); $handler->override_option('path', 'taxonomy/term/%/feed'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler->override_option('displays', array()); $handler->override_option('sitename_title', FALSE); $handler = $view->new_display('page', 'Pagina', 'page_1'); $handler->override_option('arguments', array( 'term_node_tid_depth' => array( 'default_action' => 'not found', 'style_plugin' => 'default_summary', 'style_options' => array( 'count' => TRUE, 'override' => FALSE, 'items_per_page' => 25, ), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '%1', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'taxonomy_term', 'validate_fail' => 'ignore', 'depth' => '0', 'break_phrase' => 1, 'set_breadcrumb' => 1, 'id' => 'term_node_tid_depth', 'table' => 'node', 'field' => 'term_node_tid_depth', 'relationship' => 'none', 'default_argument_fixed' => '', 'default_argument_php' => '', 'validate_argument_node_type' => array( 'forum' => 0, 'page' => 0, 'story' => 0, ), 'validate_argument_vocabulary' => array( '2' => 2, '1' => 0, '4' => 0, '3' => 0, ), 'validate_argument_type' => 'tids', 'validate_argument_php' => '', 'override' => array( 'button' => 'Override', ), 'default_options_div_prefix' => '', 'default_argument_user' => 0, 'validate_argument_node_access' => 0, 'validate_argument_nid_type' => 'nid', ), 'term_node_tid_depth_modifier' => array( 'id' => 'term_node_tid_depth_modifier', 'table' => 'node', 'field' => 'term_node_tid_depth_modifier', 'default_action' => 'ignore', 'style_plugin' => 'default_summary', 'style_options' => array( 'count' => TRUE, 'override' => FALSE, 'items_per_page' => 25, ), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'none', 'validate_fail' => 'not found', ), )); $handler->override_option('path', 'indicecronologico'); $handler->override_option('menu', array( 'type' => 'normal', 'title' => 'Indice cronnn', 'weight' => '-4', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $views[$view->name] = $view; $view = new view; $view->name = 'comments_recent'; $view->description = 'Contains a block and a page to list recent comments; the block will automatically link to the page, which displays the comment body as well as a link to the node.'; $view->tag = 'default'; $view->view_php = ''; $view->base_table = 'comments'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('relationships', array( 'nid' => array( 'id' => 'nid', 'table' => 'comments', 'field' => 'nid', 'label' => 'Node', 'required' => FALSE, ), )); $handler->override_option('fields', array( 'subject' => array( 'id' => 'subject', 'table' => 'comments', 'field' => 'subject', 'label' => '', 'link_to_comment' => 1, 'relationship' => 'none', ), 'timestamp' => array( 'id' => 'timestamp', 'table' => 'comments', 'field' => 'timestamp', 'label' => '', 'date_format' => 'time ago', 'custom_date_format' => '', 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'timestamp' => array( 'id' => 'timestamp', 'table' => 'comments', 'field' => 'timestamp', 'order' => 'DESC', 'granularity' => 'second', 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'status_extra' => array( 'id' => 'status_extra', 'table' => 'node', 'field' => 'status_extra', 'operator' => '=', 'value' => '', 'group' => 0, 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'relationship' => 'nid', ), )); $handler->override_option('access', array( 'type' => 'none', 'role' => array(), 'perm' => '', )); $handler->override_option('title', 'Commenti recenti'); $handler->override_option('items_per_page', 5); $handler->override_option('use_more', 1); $handler->override_option('style_plugin', 'list'); $handler->override_option('style_options', array( 'type' => 'ul', )); $handler = $view->new_display('page', 'Page', 'page'); $handler->override_option('fields', array( 'title' => array( 'id' => 'title', 'table' => 'node', 'field' => 'title', 'label' => 'Reply to', 'relationship' => 'nid', 'link_to_node' => 1, ), 'timestamp' => array( 'id' => 'timestamp', 'table' => 'comments', 'field' => 'timestamp', 'label' => '', 'date_format' => 'time ago', 'custom_date_format' => '', 'relationship' => 'none', ), 'subject' => array( 'id' => 'subject', 'table' => 'comments', 'field' => 'subject', 'label' => '', 'link_to_comment' => 1, 'relationship' => 'none', ), 'comment' => array( 'id' => 'comment', 'table' => 'comments', 'field' => 'comment', 'label' => '', 'relationship' => 'none', ), )); $handler->override_option('items_per_page', 25); $handler->override_option('use_pager', '1'); $handler->override_option('style_plugin', 'default'); $handler->override_option('style_options', array()); $handler->override_option('row_options', array( 'inline' => array( 'title' => 'title', 'timestamp' => 'timestamp', ), 'separator' => ' ', )); $handler->override_option('path', 'comments/recent'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler = $view->new_display('block', 'Block', 'block'); $handler->override_option('block_description', 'Recent comments view'); $handler->override_option('block_caching', -1); $views[$view->name] = $view; $view = new view; $view->name = 'tracker'; $view->description = 'Shows all new activity on system.'; $view->tag = 'default'; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('fields', array( 'type' => array( 'id' => 'type', 'table' => 'node', 'field' => 'type', 'label' => 'Type', ), 'title' => array( 'id' => 'title', 'table' => 'node', 'field' => 'title', 'label' => 'Title', 'link_to_node' => TRUE, ), 'name' => array( 'id' => 'name', 'table' => 'users', 'field' => 'name', 'label' => 'Author', 'link_to_user' => TRUE, ), 'comment_count' => array( 'id' => 'comment_count', 'table' => 'node_comment_statistics', 'field' => 'comment_count', 'label' => 'Replies', 'set_precision' => FALSE, 'precision' => 0, 'decimal' => '.', 'separator' => ',', 'prefix' => '', 'suffix' => '', ), 'last_comment_timestamp' => array( 'id' => 'last_comment_timestamp', 'table' => 'node_comment_statistics', 'field' => 'last_comment_timestamp', 'label' => 'Last Post', 'date_format' => 'small', 'custom_date_format' => '', ), 'timestamp' => array( 'id' => 'timestamp', 'table' => 'history_user', 'field' => 'timestamp', 'label' => '', 'comments' => 1, 'relationship' => 'none', 'link_to_node' => 0, 'comment' => 1, ), 'new_comments' => array( 'id' => 'new_comments', 'table' => 'node', 'field' => 'new_comments', 'label' => '', 'set_precision' => FALSE, 'precision' => 0, 'decimal' => '.', 'separator' => ',', 'prefix' => '', 'suffix' => ' new', 'link_to_comment' => 1, 'no_empty' => 1, 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'last_comment_timestamp' => array( 'id' => 'last_comment_timestamp', 'table' => 'node_comment_statistics', 'field' => 'last_comment_timestamp', 'order' => 'ASC', 'granularity' => 'second', ), )); $handler->override_option('arguments', array( 'uid' => array( 'id' => 'uid', 'table' => 'users', 'field' => 'uid', 'default_action' => 'ignore', 'style_plugin' => 'default_summary', 'style_options' => array( 'count' => TRUE, 'override' => FALSE, 'items_per_page' => 25, ), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => 'Recent posts for %1', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'none', 'validate_fail' => 'not found', 'relationship' => 'none', 'default_argument_fixed' => '', 'default_argument_php' => '', 'validate_argument_node_type' => array( 'album' => 0, 'artist' => 0, 'book' => 0, 'page' => 0, 'story' => 0, 'track' => 0, ), 'validate_argument_php' => '', ), )); $handler->override_option('filters', array( 'status' => array( 'id' => 'status', 'table' => 'node', 'field' => 'status', 'operator' => '=', 'value' => '1', 'group' => 0, 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'status' => array( 'id' => 'status', 'table' => 'comments', 'field' => 'status', 'operator' => '=', 'value' => 0, 'group' => 0, 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'relationship' => 'none', ), ), )); $handler->override_option('access', array( 'type' => 'none', 'role' => array(), 'perm' => '', )); $handler->override_option('title', 'Recent posts'); $handler->override_option('items_per_page', '25'); $handler->override_option('use_pager', TRUE); $handler->override_option('style_plugin', 'table'); $handler->override_option('style_options', array( 'override' => 1, 'order' => 'desc', 'columns' => array( 'type' => 'type', 'title' => 'title', 'name' => 'name', 'comment_count' => 'comment_count', 'last_comment_timestamp' => 'last_comment_timestamp', 'timestamp' => 'title', 'new_comments' => 'comment_count', ), 'info' => array( 'type' => array( 'sortable' => 1, 'separator' => '', ), 'title' => array( 'sortable' => 1, 'separator' => ' ', ), 'name' => array( 'sortable' => 1, 'separator' => '', ), 'comment_count' => array( 'sortable' => 1, 'separator' => '
', ), 'last_comment_timestamp' => array( 'sortable' => 1, 'separator' => ' ', ), 'timestamp' => array( 'separator' => '', ), 'new_comments' => array( 'separator' => '', ), ), 'default' => 'last_comment_timestamp', )); $handler = $view->new_display('page', 'Page', 'page'); $handler->override_option('path', 'tracker'); $handler->override_option('menu', array( 'type' => 'normal', 'title' => 'Recent posts', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => NULL, 'weight' => NULL, )); $views[$view->name] = $view; $view = new view; $view->name = 'frontpage'; $view->description = 'Emulates the default Drupal front page; you may set the default home page path to this view to make it your front page.'; $view->tag = 'default'; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('sorts', array( 'sticky' => array( 'id' => 'sticky', 'table' => 'node', 'field' => 'sticky', 'order' => 'DESC', ), 'created' => array( 'id' => 'created', 'table' => 'node', 'field' => 'created', 'order' => 'DESC', 'relationship' => 'none', 'granularity' => 'second', ), )); $handler->override_option('filters', array( 'promote' => array( 'id' => 'promote', 'table' => 'node', 'field' => 'promote', 'operator' => '=', 'value' => '1', 'group' => 0, 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), ), 'status' => array( 'id' => 'status', 'table' => 'node', 'field' => 'status', 'operator' => '=', 'value' => '1', 'group' => 0, 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), ), )); $handler->override_option('access', array( 'type' => 'none', 'role' => array(), 'perm' => '', )); $handler->override_option('header_format', '1'); $handler->override_option('footer_format', '1'); $handler->override_option('empty_format', '1'); $handler->override_option('use_ajax', '1'); $handler->override_option('use_pager', '1'); $handler->override_option('row_plugin', 'node'); $handler->override_option('row_options', array( 'teaser' => 1, 'links' => 1, )); $handler = $view->new_display('page', 'Page', 'page'); $handler->override_option('path', 'frontpage'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler = $view->new_display('feed', 'Feed', 'feed'); $handler->override_option('title', 'Front page feed'); $handler->override_option('style_plugin', 'rss'); $handler->override_option('style_options', array( 'mission_description' => 1, 'description' => '', )); $handler->override_option('row_plugin', 'node_rss'); $handler->override_option('row_options', array( 'item_length' => 'default', )); $handler->override_option('path', 'rss.xml'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler->override_option('displays', array( 'default' => 'default', 'page' => 'page', )); $handler->override_option('sitename_title', '1'); $views[$view->name] = $view; $view = new view; $view->name = 'glossary'; $view->description = 'A list of all content, by letter.'; $view->tag = 'default'; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('fields', array( 'title' => array( 'label' => 'Title', 'link_to_node' => 1, 'exclude' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'none', ), 'name' => array( 'label' => 'Author', 'link_to_user' => 1, 'exclude' => 0, 'id' => 'name', 'table' => 'users', 'field' => 'name', 'relationship' => 'none', ), 'changed' => array( 'label' => 'Last update', 'date_format' => 'large', 'custom_date_format' => '', 'exclude' => 0, 'id' => 'changed', 'table' => 'node', 'field' => 'changed', 'relationship' => 'none', ), )); $handler->override_option('arguments', array( 'title' => array( 'default_action' => 'default', 'style_plugin' => 'default_summary', 'style_options' => array(), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'none', 'validate_fail' => 'not found', 'glossary' => 1, 'limit' => '1', 'case' => 'upper', 'path_case' => 'lower', 'transform_dash' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'none', 'default_argument_user' => 0, 'default_argument_fixed' => 'a', 'default_argument_php' => '', 'validate_argument_vocabulary' => array(), 'validate_argument_type' => 'tid', 'validate_argument_php' => '', ), )); $handler->override_option('access', array( 'type' => 'none', 'role' => array(), 'perm' => '', )); $handler->override_option('use_ajax', '1'); $handler->override_option('items_per_page', 36); $handler->override_option('use_pager', '1'); $handler->override_option('style_plugin', 'table'); $handler->override_option('style_options', array( 'grouping' => '', 'override' => 1, 'sticky' => 0, 'order' => 'asc', 'columns' => array( 'title' => 'title', 'name' => 'name', 'changed' => 'changed', ), 'info' => array( 'title' => array( 'sortable' => 1, 'separator' => '', ), 'name' => array( 'sortable' => 1, 'separator' => '', ), 'changed' => array( 'sortable' => 1, 'separator' => '', ), ), 'default' => 'title', )); $handler = $view->new_display('page', 'Page', 'page'); $handler->override_option('path', 'glossary'); $handler->override_option('menu', array( 'type' => 'normal', 'title' => 'Glossary', 'weight' => '0', 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler = $view->new_display('attachment', 'Attachment', 'attachment'); $handler->override_option('arguments', array( 'title' => array( 'default_action' => 'summary asc', 'style_plugin' => 'unformatted_summary', 'style_options' => array( 'count' => 1, 'override' => 0, 'items_per_page' => '25', 'inline' => 1, 'separator' => ' | ', ), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '', 'default_argument_type' => 'fixed', 'default_argument' => '', 'validate_type' => 'none', 'validate_fail' => 'not found', 'glossary' => 1, 'limit' => '1', 'case' => 'upper', 'path_case' => 'lower', 'transform_dash' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'none', 'default_argument_user' => 0, 'default_argument_fixed' => 'a', 'validate_argument_vocabulary' => array(), 'validate_argument_php' => '', ), )); $handler->override_option('attachment_position', 'before'); $handler->override_option('inherit_arguments', 0); $handler->override_option('inherit_exposed_filters', FALSE); $handler->override_option('displays', array( 'default' => 'default', 'page' => 'page', )); $views[$view->name] = $view; $view = new view; $view->name = 'archive'; $view->description = 'Display a list of months that link to content for that month.'; $view->tag = 'default'; $view->view_php = ''; $view->base_table = 'node'; $view->is_cacheable = FALSE; $view->api_version = 2; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $handler = $view->new_display('default', 'Defaults', 'default'); $handler->override_option('sorts', array( 'created' => array( 'id' => 'created', 'table' => 'node', 'field' => 'created', 'order' => 'DESC', 'granularity' => 'second', 'relationship' => 'none', ), )); $handler->override_option('arguments', array( 'created_year_month' => array( 'id' => 'created_year_month', 'table' => 'node', 'field' => 'created_year_month', 'default_action' => 'summary desc', 'style_plugin' => 'default_summary', 'style_options' => array( 'count' => 1, 'override' => 1, 'items_per_page' => '30', ), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '%1', 'relationship' => 'none', 'validate_type' => 'none', 'validate_fail' => 'not found', 'default_argument_type' => 'fixed', ), )); $handler->override_option('filters', array( 'status' => array( 'id' => 'status', 'table' => 'node', 'field' => 'status', 'operator' => '=', 'value' => 1, 'group' => 0, 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', 'role' => array(), 'perm' => '', )); $handler->override_option('title', 'Monthly archive'); $handler->override_option('use_pager', '1'); $handler->override_option('row_plugin', 'node'); $handler->override_option('row_options', array( 'teaser' => TRUE, 'links' => TRUE, )); $handler = $view->new_display('page', 'Page', 'page'); $handler->override_option('path', 'archive'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => 0, 'name' => 'navigation', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler = $view->new_display('block', 'Block', 'block'); $handler->override_option('arguments', array( 'created_year_month' => array( 'id' => 'created_year_month', 'table' => 'node', 'field' => 'created_year_month', 'default_action' => 'summary asc', 'style_plugin' => 'default_summary', 'style_options' => array( 'count' => 1, 'override' => 0, 'items_per_page' => '30', ), 'wildcard' => 'all', 'wildcard_substitution' => 'All', 'title' => '%1', 'relationship' => 'none', 'validate_type' => 'none', 'validate_fail' => 'not found', 'default_argument_type' => 'fixed', ), )); $handler->override_option('use_ajax', '1'); $handler->override_option('block_description', 'Archive list'); $handler->override_option('block_caching', -1); $views[$view->name] = $view; return $views; }