Index: cod_faq/cod_faq.features.inc =================================================================== RCS file: cod_faq/cod_faq.features.inc diff -N cod_faq/cod_faq.features.inc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cod_faq/cod_faq.features.inc 23 Sep 2010 19:23:08 -0000 @@ -0,0 +1,40 @@ + 1); + } +} + +/** + * Implementation of hook_node_info(). + */ +function cod_faq_node_info() { + $items = array( + 'question_and_answer' => array( + 'name' => t('Question and Answer'), + 'module' => 'features', + 'description' => t('Information presented in Q&A format, i.e. FAQ.'), + 'has_title' => '1', + 'title_label' => t('Question'), + 'has_body' => '1', + 'body_label' => t('Answer'), + 'min_word_count' => '0', + 'help' => '', + ), + ); + return $items; +} + +/** + * Implementation of hook_views_api(). + */ +function cod_faq_views_api() { + return array( + 'api' => '2', + ); +} Index: cod_faq/cod_faq.features.node.inc =================================================================== RCS file: cod_faq/cod_faq.features.node.inc diff -N cod_faq/cod_faq.features.node.inc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cod_faq/cod_faq.features.node.inc 23 Sep 2010 19:23:08 -0000 @@ -0,0 +1,21 @@ + array( + 'name' => t('Question and Answer'), + 'module' => 'features', + 'description' => t('Information presented in Q&A format, i.e. FAQ.'), + 'has_title' => '1', + 'title_label' => t('Question'), + 'has_body' => '1', + 'body_label' => t('Answer'), + 'min_word_count' => '0', + 'help' => '', + ), + ); + return $items; +} Index: cod_faq/cod_faq.features.views.inc =================================================================== RCS file: cod_faq/cod_faq.features.views.inc diff -N cod_faq/cod_faq.features.views.inc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cod_faq/cod_faq.features.views.inc 23 Sep 2010 19:23:08 -0000 @@ -0,0 +1,93 @@ +name = 'questions'; + $view->description = 'Questions and Answers'; + $view->tag = 'question'; + $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('filters', array( + 'status_extra' => array( + 'operator' => '=', + 'value' => '', + 'group' => '0', + 'exposed' => FALSE, + 'expose' => array( + 'operator' => FALSE, + 'label' => '', + ), + 'id' => 'status_extra', + 'table' => 'node', + 'field' => 'status_extra', + 'override' => array( + 'button' => 'Override', + ), + 'relationship' => 'none', + ), + 'type' => array( + 'operator' => 'in', + 'value' => array( + 'question_and_answer' => 'question_and_answer', + ), + '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', + )); + $handler->override_option('cache', array( + 'type' => 'none', + )); + $handler->override_option('title', 'FAQ'); + $handler->override_option('items_per_page', 10000); + $handler->override_option('row_plugin', 'node'); + $handler->override_option('row_options', array( + 'relationship' => 'none', + 'build_mode' => 'full', + 'links' => 1, + 'comments' => 0, + )); + $handler = $view->new_display('page', 'FAQ Page', 'page_1'); + $handler->override_option('path', 'faq'); + $handler->override_option('menu', array( + 'type' => 'normal', + 'title' => 'FAQ', + 'description' => '', + 'weight' => '0', + 'name' => 'secondary-links', + )); + $handler->override_option('tab_options', array( + 'type' => 'none', + 'title' => '', + 'description' => '', + 'weight' => 0, + 'name' => 'navigation', + )); + + $views[$view->name] = $view; + + return $views; +} Index: cod_faq/cod_faq.info =================================================================== RCS file: cod_faq/cod_faq.info diff -N cod_faq/cod_faq.info --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cod_faq/cod_faq.info 23 Sep 2010 19:23:08 -0000 @@ -0,0 +1,13 @@ +core = "6.x" +dependencies[] = "features" +dependencies[] = "menu" +dependencies[] = "strongarm" +dependencies[] = "views" +description = "A question and answer content type with a FAQ view" +features[ctools][] = "strongarm:strongarm:1" +features[node][] = "question_and_answer" +features[views][] = "questions" +features[views_api][] = "api:2" +name = "COD FAQ" +package = "Features" +project = "cod_faq" Index: cod_faq/cod_faq.module =================================================================== RCS file: cod_faq/cod_faq.module diff -N cod_faq/cod_faq.module --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cod_faq/cod_faq.module 23 Sep 2010 19:23:08 -0000 @@ -0,0 +1,3 @@ +name = 'questions'; + $view->description = 'Questions and Answers'; + $view->tag = 'question'; + $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('filters', array( + 'status_extra' => array( + 'operator' => '=', + 'value' => '', + 'group' => '0', + 'exposed' => FALSE, + 'expose' => array( + 'operator' => FALSE, + 'label' => '', + ), + 'id' => 'status_extra', + 'table' => 'node', + 'field' => 'status_extra', + 'override' => array( + 'button' => 'Override', + ), + 'relationship' => 'none', + ), + 'type' => array( + 'operator' => 'in', + 'value' => array( + 'question_and_answer' => 'question_and_answer', + ), + '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', + )); + $handler->override_option('cache', array( + 'type' => 'none', + )); + $handler->override_option('title', 'FAQ'); + $handler->override_option('items_per_page', 10000); + $handler->override_option('row_plugin', 'node'); + $handler->override_option('row_options', array( + 'relationship' => 'none', + 'build_mode' => 'full', + 'links' => 1, + 'comments' => 0, + )); + $handler = $view->new_display('page', 'FAQ Page', 'page_1'); + $handler->override_option('path', 'faq'); + $handler->override_option('menu', array( + 'type' => 'normal', + 'title' => 'FAQ', + 'description' => '', + 'weight' => '0', + 'name' => 'secondary-links', + )); + $handler->override_option('tab_options', array( + 'type' => 'none', + 'title' => '', + 'description' => '', + 'weight' => 0, + 'name' => 'navigation', + )); + + $views[$view->name] = $view; + + return $views; +}