$view = new view; $view->name = 'forum_view'; $view->description = 'forum_completo'; $view->tag = ''; $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' => 'titolo discussione', 'link_to_node' => 1, 'exclude' => 0, 'id' => 'title', 'table' => 'node', 'field' => 'title', 'relationship' => 'none', ), 'subject' => array( 'label' => 'anteprima commento', 'link_to_comment' => 1, 'exclude' => 0, 'id' => 'subject', 'table' => 'comments', 'field' => 'subject', 'relationship' => 'none', ), 'name' => array( 'label' => 'autore commento', 'link_to_user' => 1, 'exclude' => 0, 'id' => 'name', 'table' => 'comments', 'field' => 'name', 'relationship' => 'none', ), 'timestamp' => array( 'label' => 'Nuovi commenti', 'link_to_node' => 1, 'comments' => 1, 'exclude' => 0, 'id' => 'timestamp', 'table' => 'history_user', 'field' => 'timestamp', 'relationship' => 'none', ), 'timestamp_1' => array( 'label' => 'scritto', 'date_format' => 'time ago', 'custom_date_format' => '', 'exclude' => 0, 'id' => 'timestamp_1', 'table' => 'comments', 'field' => 'timestamp', 'relationship' => 'none', ), 'comment_count' => array( 'label' => 'cliccato', 'set_precision' => FALSE, 'precision' => 0, 'decimal' => '.', 'separator' => ',', 'prefix' => '', 'suffix' => '', 'exclude' => 0, 'id' => 'comment_count', 'table' => 'node_comment_statistics', 'field' => 'comment_count', 'relationship' => 'none', ), )); $handler->override_option('sorts', array( 'created' => array( 'order' => 'DESC', 'granularity' => 'second', 'id' => 'created', 'table' => 'node', 'field' => 'created', 'relationship' => 'none', ), 'timestamp' => array( 'order' => 'DESC', 'granularity' => 'second', 'id' => 'timestamp', 'table' => 'comments', 'field' => 'timestamp', 'relationship' => 'none', ), )); $handler->override_option('filters', array( 'status' => array( 'operator' => '=', 'value' => 1, 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'status', 'table' => 'node', 'field' => 'status', 'relationship' => 'none', ), 'type' => array( 'operator' => 'in', 'value' => array( 'forum' => 'forum', ), 'group' => '0', 'exposed' => FALSE, 'expose' => array( 'operator' => FALSE, 'label' => '', ), 'id' => 'type', 'table' => 'node', 'field' => 'type', 'relationship' => 'none', ), )); $handler->override_option('access', array( 'type' => 'none', 'role' => array(), 'perm' => '', )); $handler->override_option('use_ajax', TRUE); $handler->override_option('items_per_page', 15); $handler->override_option('use_pager', 'mini'); $handler->override_option('pager_element', 1); $handler->override_option('use_more', 1); $handler->override_option('style_plugin', 'table'); $handler->override_option('style_options', array( 'grouping' => '', 'override' => 1, 'sticky' => 0, 'order' => 'desc', 'columns' => array( 'title' => 'title', ), 'info' => array( 'title' => array( 'sortable' => 0, 'separator' => '', ), ), 'default' => '-1', )); $handler = $view->new_display('page', 'forum in home', 'page_1'); $handler->override_option('path', 'forum_front'); $handler->override_option('menu', array( 'type' => 'none', 'title' => '', 'weight' => '0', )); $handler->override_option('tab_options', array( 'type' => 'none', 'title' => '', 'weight' => 0, )); $handler = $view->new_display('block', 'Blocco', 'block_1'); $handler->override_option('block_description', 'forum_frontpage');