diff --git a/drupalorg_handbook/drupalorg_handbook.module b/drupalorg_handbook/drupalorg_handbook.module index 6c1c0cf..4fbee6a 100644 --- a/drupalorg_handbook/drupalorg_handbook.module +++ b/drupalorg_handbook/drupalorg_handbook.module @@ -37,6 +37,12 @@ function drupalorg_handbook_nodeapi(&$node, $op = 'view', $teaser = FALSE, $page $node->extra_footer = theme('drupalorg_handbook_footer_line'); } } + elseif ($node->type == 'book_listing') { + // Mark the taxonomy terms as rendered so they don't display on the node. + foreach ($node->taxonomy as $term_id => $dummy) { + $node->taxonomy[$term_id]->rendered = TRUE; + } + } } elseif (($op == 'update' || $op == 'insert') && !empty($node->book) && !empty($node->book['bid'])) { // Remove all cached versions of recently updated data (home). @@ -66,15 +72,15 @@ function drupalorg_handbook_link($type, $object, $teaser = FALSE) { * does not have permission to create issues. */ function drupalorg_handbook_moderate_link_info($node) { - if (!user_access('create project issues') || drupalorg_crosssite_section() !== 'documentation') { + if (!user_access('create project issues') || (drupalorg_crosssite_section() !== 'documentation' && $node->type != 'book_listing')) { return NULL; } return array( 'title' => t('Report to moderator'), - 'href' => 'node/add/project-issue/documentation', + 'href' => 'node/add/project-issue/webmasters', 'query' => array( 'categories' => 'task', - 'component' => 'Vandalism/Spam', + 'component' => 'Spam', 'title' => t('Moderation report for !title', array('!title' => $node->title)), 'body' => t('I am reporting !url to moderators because:', array('!url' => url('node/' . $node->nid, array('absolute' => TRUE)))), ), @@ -162,6 +168,22 @@ function drupalorg_handbook_meta_data() { $about['status'] = '

' . check_plain($term->name) . '

'; break; + case 59: + // Book availability: use as status line. + $class = 'page-ok'; + switch ($term_id) { + case 34514: // Out of print + case 34513: // Upcoming + $class = 'page-needs-work'; + break; + + case 34515: // Canceled + $class = 'page-major-problem'; + break; + } + $about['status'] = '

' . check_plain($term->name) . '

'; + break; + case 54: // Keywords vocabulary: print a link, separate section. $keywords[] = l($term->name, taxonomy_term_path($term)); @@ -276,6 +298,10 @@ function drupalorg_handbook_block($op = 'list', $delta = 0, $edit = array()) { 'info' => t('Documentation about'), 'cache' => BLOCK_NO_CACHE, ), + 'book-listing-info' => array( + 'info' => t('Book listings information'), + 'cache' => BLOCK_CACHE_PER_ROLE, + ), ); case 'view': @@ -291,7 +317,7 @@ function drupalorg_handbook_block($op = 'list', $delta = 0, $edit = array()) { break; case 'meta-sidebar': - if (($section === 'documentation' || $section === 'community') && isset($node) && isset($node->book['bid'])) { + if ((($section === 'documentation' || $section === 'community') && isset($node) && isset($node->book['bid'])) || (isset($node) && $node->type == 'book_listing')) { $about = drupalorg_handbook_meta_data(); $links = array(); if (node_access('update', $node)) { @@ -305,25 +331,38 @@ function drupalorg_handbook_block($op = 'list', $delta = 0, $edit = array()) { $links['report'] = l($report_link['title'], $report_link['href'], array('query' => $report_link['query'])); } + $title = (isset($node) && $node->type == 'book_listing') ? t('Book status') : t('Page status'); return array( - 'subject' => t('Page status'), + 'subject' => $title, 'content' => $about['status'] . '

' . implode('
', $links) . '

', ); } break; case 'about-page': - if (($section === 'documentation' || $section === 'community') && isset($node) && isset($node->book['bid'])) { + if ((($section === 'documentation' || $section === 'community') && isset($node) && isset($node->book['bid'])) || (isset($node) && $node->type == 'book_listing')) { $about = drupalorg_handbook_meta_data(); unset($about['status']); if (!empty($about)) { + $title = (isset($node) && $node->type == 'book_listing') ? t('About this book') : t('About this page'); return array( - 'subject' => t('About this page'), + 'subject' => $title, 'content' => theme('drupalorg_handbook_meta_sidebar', $about), ); } } break; + + case 'book-listing-info': + if ((isset($node) && $node->type == 'book_listing') || + drupalorg_crosssite_child_of('books') || + drupalorg_crosssite_child_of('node/add/book-listing')) { + return array( + 'subject' => '', + 'content' => drupalorg_handbook_book_listing_block(), + ); + } + break; } } } @@ -414,3 +453,17 @@ function drupalorg_handbook_form_comment_form_alter(&$form, $form_state) { } } } + +/** + * Returns block content for the book listing sidebar block. + */ +function drupalorg_handbook_book_listing_block() { + $content = ''; + if (user_access('create book_listing content')) { + $content .= '

' . l(t('Create new book listing'), 'node/add/book-listing') . '

'; + } + $content .= '

' . l(t('View book listing guidelines'), 'node/1691562') . '

'; + $content .= '

' . t('Drupal.org’s online content is © 2000-!year by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. Book descriptions are generally copyrighted by the book author or publisher, and are added to this web site with permission.', array('!year' => date('Y'), '@ccl_url' => url('node/14307'))) . '

'; + + return $content; +} diff --git a/features/drupalorg_book_listings/drupalorg_book_listings.features.content.inc b/features/drupalorg_book_listings/drupalorg_book_listings.features.content.inc new file mode 100644 index 0000000..65cb467 --- /dev/null +++ b/features/drupalorg_book_listings/drupalorg_book_listings.features.content.inc @@ -0,0 +1,758 @@ + 'field_book_description', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => '10', + 'parent' => '', + 'label' => array( + 'format' => 'hidden', + ), + 'teaser' => array( + 'format' => 'hidden', + 'exclude' => 1, + ), + 'full' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'default', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'text', + 'required' => '0', + 'multiple' => '0', + 'module' => 'text', + 'active' => '1', + 'text_processing' => '1', + 'max_length' => '', + 'allowed_values' => '', + 'allowed_values_php' => '', + 'widget' => array( + 'rows' => '10', + 'size' => 60, + 'default_value' => array( + '0' => array( + 'value' => '', + 'format' => '1', + '_error_element' => 'default_value_widget][field_book_description][0][value', + ), + ), + 'default_value_php' => NULL, + 'label' => 'Book description', + 'weight' => '10', + 'description' => 'Full description of the book\'s content. Do not include copyrighted information here without permission!', + 'type' => 'text_textarea', + 'module' => 'text', + ), + ); + + // Exported field: field_book_isbn_10 + $fields['book_listing-field_book_isbn_10'] = array( + 'field_name' => 'field_book_isbn_10', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => '9', + 'parent' => '', + 'label' => array( + 'format' => 'hidden', + ), + 'teaser' => array( + 'format' => 'default', + 'exclude' => 0, + ), + 'full' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'default', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'text', + 'required' => '1', + 'multiple' => '0', + 'module' => 'text', + 'active' => '1', + 'text_processing' => '0', + 'max_length' => '10', + 'allowed_values' => '', + 'allowed_values_php' => '', + 'widget' => array( + 'rows' => 5, + 'size' => '10', + 'default_value' => array( + '0' => array( + 'value' => '', + '_error_element' => 'default_value_widget][field_book_isbn_10][0][value', + ), + ), + 'default_value_php' => NULL, + 'label' => 'ISBN-10', + 'weight' => '8', + 'description' => 'Note: The ISBN-10 is also the Amazon ID (ASIN) for books. It is used to build the Amazon purchase links.', + 'type' => 'text_textfield', + 'module' => 'text', + ), + ); + + // Exported field: field_book_isbn_13 + $fields['book_listing-field_book_isbn_13'] = array( + 'field_name' => 'field_book_isbn_13', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => '7', + 'parent' => '', + 'label' => array( + 'format' => 'inline', + ), + 'teaser' => array( + 'format' => 'default', + 'exclude' => 0, + ), + 'full' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'default', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'text', + 'required' => '1', + 'multiple' => '0', + 'module' => 'text', + 'active' => '1', + 'text_processing' => '0', + 'max_length' => '14', + 'allowed_values' => '', + 'allowed_values_php' => '', + 'widget' => array( + 'rows' => 5, + 'size' => '14', + 'default_value' => array( + '0' => array( + 'value' => '', + '_error_element' => 'default_value_widget][field_book_isbn_13][0][value', + ), + ), + 'default_value_php' => NULL, + 'label' => 'ISBN-13', + 'weight' => '7', + 'description' => 'All books have an ISBN-13, which is the new standard for book identification.', + 'type' => 'text_textfield', + 'module' => 'text', + ), + ); + + // Exported field: field_book_listing_authors + $fields['book_listing-field_book_listing_authors'] = array( + 'field_name' => 'field_book_listing_authors', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => '1', + 'parent' => '', + 'label' => array( + 'format' => 'inline', + ), + 'teaser' => array( + 'format' => 'default', + 'exclude' => 0, + ), + 'full' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'default', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'text', + 'required' => '1', + 'multiple' => '0', + 'module' => 'text', + 'active' => '1', + 'text_processing' => '1', + 'max_length' => '', + 'allowed_values' => '', + 'allowed_values_php' => '', + 'widget' => array( + 'rows' => '5', + 'size' => 60, + 'default_value' => array( + '0' => array( + 'value' => '', + 'format' => '1', + '_error_element' => 'default_value_widget][field_book_listing_authors][0][value', + ), + ), + 'default_value_php' => NULL, + 'label' => 'Authors', + 'weight' => '1', + 'description' => 'Enter list of authors\' full names (as shown by publisher), with each one linked to that author\'s Drupal.org user profile. Include a title attribute on each link showing the Drupal.org username; e.g., <a href="/user/1773" title="emmajane | drupal.org">Emma Jane Hogbin</a>', + 'type' => 'text_textarea', + 'module' => 'text', + ), + ); + + // Exported field: field_book_listing_date + $fields['book_listing-field_book_listing_date'] = array( + 'field_name' => 'field_book_listing_date', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => '4', + 'parent' => '', + 'label' => array( + 'format' => 'inline', + ), + 'teaser' => array( + 'format' => 'default', + 'exclude' => 0, + ), + 'full' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'default', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'date', + 'required' => '1', + 'multiple' => '0', + 'module' => 'date', + 'active' => '1', + 'granularity' => array( + 'year' => 'year', + 'month' => 'month', + 'day' => 'day', + ), + 'timezone_db' => '', + 'tz_handling' => 'none', + 'todate' => '', + 'repeat' => 0, + 'repeat_collapsed' => '', + 'default_format' => 'medium', + 'widget' => array( + 'default_value' => 'now', + 'default_value_code' => '', + 'default_value2' => 'same', + 'default_value_code2' => '', + 'input_format' => 'M j Y - H:i:s', + 'input_format_custom' => 'Y-m-d', + 'increment' => 1, + 'text_parts' => array(), + 'year_range' => '-3:+3', + 'label_position' => 'above', + 'label' => 'Publication date', + 'weight' => '4', + 'description' => '', + 'type' => 'date_text', + 'module' => 'date', + ), + ); + + // Exported field: field_book_page_count + $fields['book_listing-field_book_page_count'] = array( + 'field_name' => 'field_book_page_count', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => '5', + 'parent' => '', + 'label' => array( + 'format' => 'inline', + ), + 'teaser' => array( + 'format' => 'fr_0', + 'exclude' => 0, + ), + 'full' => array( + 'format' => 'fr_0', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'default', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'number_integer', + 'required' => '0', + 'multiple' => '0', + 'module' => 'number', + 'active' => '1', + 'prefix' => '', + 'suffix' => '', + 'min' => '40', + 'max' => '10000', + 'allowed_values' => '', + 'allowed_values_php' => '', + 'widget' => array( + 'default_value' => array( + '0' => array( + 'value' => '', + '_error_element' => 'default_value_widget][field_book_page_count][0][value', + ), + ), + 'default_value_php' => NULL, + 'label' => 'Page count', + 'weight' => '5', + 'description' => '', + 'type' => 'number', + 'module' => 'number', + ), + ); + + // Exported field: field_book_purchase_link + $fields['book_listing-field_book_purchase_link'] = array( + 'field_name' => 'field_book_purchase_link', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => '8', + 'parent' => '', + 'label' => array( + 'format' => 'hidden', + ), + 'teaser' => array( + 'format' => 'default', + 'exclude' => 0, + ), + 'full' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'default', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'link', + 'required' => '0', + 'multiple' => '0', + 'module' => 'link', + 'active' => '1', + 'attributes' => array( + 'target' => 'default', + 'rel' => 'nofollow', + 'class' => 'order_link', + 'title' => 'Order directly from the publisher', + ), + 'display' => array( + 'url_cutoff' => '80', + ), + 'url' => 0, + 'title' => 'none', + 'title_value' => '', + 'enable_tokens' => '', + 'validate_url' => 1, + 'widget' => array( + 'default_value' => array( + '0' => array( + 'title' => '', + 'url' => '', + ), + ), + 'default_value_php' => NULL, + 'label' => 'Direct purchase link', + 'weight' => '9', + 'description' => 'This field is only for books published by Packt publishing, which donates a portion of sales of Drupal-related books to the Drupal Association. +URL: http://www.packtpub.com/drupal-7-webform-popular-contributed-modules-cookbook/book', + 'type' => 'link', + 'module' => 'link', + ), + ); + + // Exported field: field_book_subtitle + $fields['book_listing-field_book_subtitle'] = array( + 'field_name' => 'field_book_subtitle', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => 0, + 'parent' => '', + 'label' => array( + 'format' => 'inline', + ), + 'teaser' => array( + 'format' => 'default', + 'exclude' => 0, + ), + 'full' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'default', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'text', + 'required' => '0', + 'multiple' => '0', + 'module' => 'text', + 'active' => '1', + 'text_processing' => '0', + 'max_length' => '200', + 'allowed_values' => '', + 'allowed_values_php' => '', + 'widget' => array( + 'rows' => 5, + 'size' => '80', + 'default_value' => array( + '0' => array( + 'value' => '', + '_error_element' => 'default_value_widget][field_book_subtitle][0][value', + ), + ), + 'default_value_php' => NULL, + 'label' => 'Sub-title', + 'weight' => 0, + 'description' => 'If the book has a "sub-title", add it in this field. E.g. Book title: "Cracking Drupal" has sub-title "A Drop in the Bucket", which in the Views display is shown on a second line, below the title.', + 'type' => 'text_textfield', + 'module' => 'text', + ), + ); + + // Exported field: field_cover_image + $fields['book_listing-field_cover_image'] = array( + 'field_name' => 'field_cover_image', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => '-1', + 'parent' => '', + 'label' => array( + 'format' => 'hidden', + ), + 'teaser' => array( + 'format' => 'grid-2_linked', + 'exclude' => 0, + ), + 'full' => array( + 'format' => 'grid-3_imagelink', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'image_plain', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'image_plain', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'image_plain', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'image_plain', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'filefield', + 'required' => '0', + 'multiple' => '0', + 'module' => 'filefield', + 'active' => '1', + 'list_field' => '0', + 'list_default' => 1, + 'description_field' => '0', + 'widget' => array( + 'file_extensions' => 'png jpg jpeg', + 'file_path' => 'book_covers', + 'progress_indicator' => 'bar', + 'max_filesize_per_file' => '1024K', + 'max_filesize_per_node' => '1024K', + 'max_resolution' => '800x800', + 'min_resolution' => '0', + 'alt' => 'Cover image for this book', + 'custom_alt' => 0, + 'title' => '', + 'custom_title' => 0, + 'title_type' => 'textfield', + 'default_image' => array( + 'filename' => 'default_book-cover.png', + 'filepath' => 'files/imagefield_default_images/default_book-cover.png', + 'filemime' => 'image/png', + 'source' => 'default_image_upload', + 'destination' => 'files/imagefield_default_images/default_book-cover.png', + 'filesize' => 20457, + 'uid' => '628196', + 'status' => 1, + 'timestamp' => 1332943468, + 'fid' => '4115571', + ), + 'use_default_image' => 1, + 'label' => 'Cover image', + 'weight' => '-1', + 'description' => '', + 'type' => 'imagefield_widget', + 'module' => 'imagefield', + ), + ); + + // Exported field: field_official_website + $fields['book_listing-field_official_website'] = array( + 'field_name' => 'field_official_website', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => '6', + 'parent' => '', + 'label' => array( + 'format' => 'hidden', + ), + 'teaser' => array( + 'format' => 'default', + 'exclude' => 0, + ), + 'full' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'default', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'link', + 'required' => '0', + 'multiple' => '0', + 'module' => 'link', + 'active' => '1', + 'attributes' => array( + 'target' => 'default', + 'rel' => 'nofollow', + 'class' => '', + 'title' => 'A book’s official website may contain links to download errata, code used in the book, etc.', + ), + 'display' => array( + 'url_cutoff' => '80', + ), + 'url' => 0, + 'title' => 'value', + 'title_value' => 'Official website for this book', + 'enable_tokens' => '', + 'validate_url' => 1, + 'widget' => array( + 'default_value' => array( + '0' => array( + 'url' => '', + ), + ), + 'default_value_php' => NULL, + 'label' => 'Website', + 'weight' => '6', + 'description' => 'If the book has a special website, enter it here; e.g. http://crackingdrupal.com is a site produced by Greg Knaddison, the author of "Cracking Drupal". These sites might have published errata or code to download, etc.', + 'type' => 'link', + 'module' => 'link', + ), + ); + + // Exported field: field_publisher + $fields['book_listing-field_publisher'] = array( + 'field_name' => 'field_publisher', + 'type_name' => 'book_listing', + 'display_settings' => array( + 'weight' => '3', + 'parent' => '', + 'label' => array( + 'format' => 'inline', + ), + 'teaser' => array( + 'format' => 'default', + 'exclude' => 0, + ), + 'full' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '5' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '4' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '2' => array( + 'format' => 'default', + 'exclude' => 0, + ), + '3' => array( + 'format' => 'default', + 'exclude' => 0, + ), + ), + 'widget_active' => '1', + 'type' => 'text', + 'required' => '0', + 'multiple' => '0', + 'module' => 'text', + 'active' => '1', + 'text_processing' => '0', + 'max_length' => '', + 'allowed_values' => '', + 'allowed_values_php' => '', + 'widget' => array( + 'rows' => 5, + 'size' => '60', + 'default_value' => array( + '0' => array( + 'value' => '', + '_error_element' => 'default_value_widget][field_publisher][0][value', + ), + ), + 'default_value_php' => NULL, + 'label' => 'Publisher', + 'weight' => '3', + 'description' => 'The listed publisher of the book.', + 'type' => 'text_textfield', + 'module' => 'text', + ), + ); + + // Translatables + // Included for use with string extractors like potx. + t('Authors'); + t('Book description'); + t('Cover image'); + t('Direct purchase link'); + t('ISBN-10'); + t('ISBN-13'); + t('Page count'); + t('Publication date'); + t('Publisher'); + t('Sub-title'); + t('Website'); + + return $fields; +} diff --git a/features/drupalorg_book_listings/drupalorg_book_listings.features.inc b/features/drupalorg_book_listings/drupalorg_book_listings.features.inc new file mode 100644 index 0000000..3561d57 --- /dev/null +++ b/features/drupalorg_book_listings/drupalorg_book_listings.features.inc @@ -0,0 +1,30 @@ + array( + 'name' => t('Book listing'), + 'module' => 'features', + 'description' => t('A published published print or e-book covering a Drupal-related topic.'), + 'has_title' => '1', + 'title_label' => t('Title'), + 'has_body' => '0', + 'body_label' => '', + 'min_word_count' => '0', + 'help' => '', + ), + ); + return $items; +} + +/** + * Implementation of hook_views_api(). + */ +function drupalorg_book_listings_views_api() { + return array( + 'api' => '2', + ); +} diff --git a/features/drupalorg_book_listings/drupalorg_book_listings.features.taxonomy.inc b/features/drupalorg_book_listings/drupalorg_book_listings.features.taxonomy.inc new file mode 100644 index 0000000..b61b8ab --- /dev/null +++ b/features/drupalorg_book_listings/drupalorg_book_listings.features.taxonomy.inc @@ -0,0 +1,24 @@ + array( + 'name' => 'Book availability', + 'description' => '', + 'help' => '', + 'relations' => '1', + 'hierarchy' => '0', + 'multiple' => '0', + 'required' => '1', + 'weight' => '0', + 'module' => 'features_book_listing_status', + 'tags' => '0', + 'nodes' => array( + 'book_listing' => 'book_listing', + ), + ), + ); +} diff --git a/features/drupalorg_book_listings/drupalorg_book_listings.info b/features/drupalorg_book_listings/drupalorg_book_listings.info new file mode 100644 index 0000000..3016cbf --- /dev/null +++ b/features/drupalorg_book_listings/drupalorg_book_listings.info @@ -0,0 +1,32 @@ +core = "6.x" +dependencies[] = "date" +dependencies[] = "drupalorg_grid" +dependencies[] = "features" +dependencies[] = "imagecache" +dependencies[] = "imagefield" +dependencies[] = "link" +dependencies[] = "number" +dependencies[] = "taxonomy" +dependencies[] = "text" +dependencies[] = "views" +description = "Book listing content type and view" +features[content][] = "book_listing-field_book_description" +features[content][] = "book_listing-field_book_isbn_10" +features[content][] = "book_listing-field_book_isbn_13" +features[content][] = "book_listing-field_book_listing_authors" +features[content][] = "book_listing-field_book_listing_date" +features[content][] = "book_listing-field_book_page_count" +features[content][] = "book_listing-field_book_purchase_link" +features[content][] = "book_listing-field_book_subtitle" +features[content][] = "book_listing-field_cover_image" +features[content][] = "book_listing-field_official_website" +features[content][] = "book_listing-field_publisher" +features[node][] = "book_listing" +features[taxonomy][] = "book_listing_status" +features[views][] = "book_listings" +features[views_api][] = "api:2" +name = "drupalorg_book_listings" +package = "Features" +project = "drupalorg_book_listings" +project status url = "http://drupal.org" +version = "6.x-1.0" diff --git a/features/drupalorg_book_listings/drupalorg_book_listings.module b/features/drupalorg_book_listings/drupalorg_book_listings.module new file mode 100644 index 0000000..8e140d3 --- /dev/null +++ b/features/drupalorg_book_listings/drupalorg_book_listings.module @@ -0,0 +1,3 @@ +name = 'book_listings'; + $view->description = 'Provides displays for book listings (printed books about Drupal)'; + $view->tag = ''; + $view->base_table = 'node'; + $view->core = 6; + $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( + 'nid' => array( + 'label' => 'Nid', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'link_to_node' => 0, + 'exclude' => 1, + 'id' => 'nid', + 'table' => 'node', + 'field' => 'nid', + 'relationship' => 'none', + ), + 'title' => array( + 'label' => '', + 'alter' => array( + 'alter_text' => 1, + 'text' => '

[title]

', + 'make_link' => 0, + 'path' => 'node/[nid]', + 'absolute' => 0, + 'link_class' => 'clear', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'link_to_node' => 0, + 'exclude' => 0, + 'id' => 'title', + 'table' => 'node', + 'field' => 'title', + 'relationship' => 'none', + ), + 'field_cover_image_fid' => array( + 'label' => '', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 1, + 'empty_zero' => 0, + 'hide_alter_empty' => 1, + 'link_to_node' => 1, + 'label_type' => 'none', + 'format' => 'grid-2_default', + 'multiple' => array( + 'group' => TRUE, + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_reversed' => FALSE, + ), + 'exclude' => 0, + 'id' => 'field_cover_image_fid', + 'table' => 'node_data_field_cover_image', + 'field' => 'field_cover_image_fid', + 'relationship' => 'none', + 'override' => array( + 'button' => 'Override', + ), + ), + 'field_book_subtitle_value' => array( + 'label' => '', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 1, + 'link_to_node' => 0, + 'label_type' => 'none', + 'format' => 'default', + 'multiple' => array( + 'group' => TRUE, + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_reversed' => FALSE, + ), + 'exclude' => 0, + 'id' => 'field_book_subtitle_value', + 'table' => 'node_data_field_book_subtitle', + 'field' => 'field_book_subtitle_value', + 'relationship' => 'none', + ), + 'field_book_listing_authors_value' => array( + 'label' => '', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'link_to_node' => 0, + 'label_type' => 'none', + 'format' => 'default', + 'multiple' => array( + 'group' => TRUE, + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_reversed' => FALSE, + ), + 'exclude' => 0, + 'id' => 'field_book_listing_authors_value', + 'table' => 'node_data_field_book_listing_authors', + 'field' => 'field_book_listing_authors_value', + 'relationship' => 'none', + ), + 'tid' => array( + 'label' => 'Drupal version', + 'alter' => array( + 'alter_text' => 0, + 'text' => 'Drupal version: [tid]', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 1, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'type' => 'separator', + 'separator' => ', ', + 'link_to_taxonomy' => 0, + 'limit' => 1, + 'vids' => array( + 5 => 5, + 1 => 0, + 38 => 0, + 54 => 0, + 56 => 0, + 6 => 0, + 4 => 0, + 44 => 0, + 46 => 0, + 3 => 0, + 48 => 0, + 50 => 0, + 59 => 0, + 52 => 0, + 58 => 0, + 7 => 0, + 2 => 0, + 31 => 0, + 32 => 0, + 33 => 0, + 34 => 0, + 9 => 0, + ), + 'exclude' => 0, + 'id' => 'tid', + 'table' => 'term_node', + 'field' => 'tid', + 'relationship' => 'none', + ), + 'tid_1' => array( + 'label' => 'Audience', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 1, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'type' => 'separator', + 'separator' => ', ', + 'link_to_taxonomy' => 0, + 'limit' => 1, + 'vids' => array( + 38 => 38, + 1 => 0, + 5 => 0, + 54 => 0, + 56 => 0, + 6 => 0, + 4 => 0, + 44 => 0, + 46 => 0, + 3 => 0, + 48 => 0, + 50 => 0, + 59 => 0, + 52 => 0, + 58 => 0, + 7 => 0, + 2 => 0, + 31 => 0, + 32 => 0, + 33 => 0, + 34 => 0, + 9 => 0, + ), + 'exclude' => 0, + 'id' => 'tid_1', + 'table' => 'term_node', + 'field' => 'tid', + 'relationship' => 'none', + ), + 'tid_2' => array( + 'label' => 'Level', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 1, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'type' => 'separator', + 'separator' => ', ', + 'link_to_taxonomy' => 0, + 'limit' => 1, + 'vids' => array( + 56 => 56, + 1 => 0, + 5 => 0, + 38 => 0, + 54 => 0, + 6 => 0, + 4 => 0, + 44 => 0, + 46 => 0, + 3 => 0, + 48 => 0, + 50 => 0, + 59 => 0, + 52 => 0, + 58 => 0, + 7 => 0, + 2 => 0, + 31 => 0, + 32 => 0, + 33 => 0, + 34 => 0, + 9 => 0, + ), + 'exclude' => 0, + 'id' => 'tid_2', + 'table' => 'term_node', + 'field' => 'tid', + 'relationship' => 'none', + ), + 'tid_3' => array( + 'label' => 'Keywords', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 1, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'type' => 'separator', + 'separator' => ', ', + 'link_to_taxonomy' => 0, + 'limit' => 1, + 'vids' => array( + 54 => 54, + 1 => 0, + 5 => 0, + 38 => 0, + 56 => 0, + 6 => 0, + 4 => 0, + 44 => 0, + 46 => 0, + 3 => 0, + 48 => 0, + 50 => 0, + 59 => 0, + 52 => 0, + 58 => 0, + 7 => 0, + 2 => 0, + 31 => 0, + 32 => 0, + 33 => 0, + 34 => 0, + 9 => 0, + ), + 'exclude' => 0, + 'id' => 'tid_3', + 'table' => 'term_node', + 'field' => 'tid', + 'relationship' => 'none', + ), + 'field_book_listing_date_value' => array( + 'label' => '', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'link_to_node' => 0, + 'label_type' => 'none', + 'format' => 'default', + 'multiple' => array( + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_to' => '', + 'group' => TRUE, + ), + 'repeat' => array( + 'show_repeat_rule' => '', + ), + 'fromto' => array( + 'fromto' => 'both', + ), + 'exclude' => 1, + 'id' => 'field_book_listing_date_value', + 'table' => 'node_data_field_book_listing_date', + 'field' => 'field_book_listing_date_value', + 'relationship' => 'none', + ), + 'field_book_page_count_value' => array( + 'label' => '', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'link_to_node' => 0, + 'label_type' => 'none', + 'format' => 'us_0', + 'multiple' => array( + 'group' => TRUE, + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_reversed' => FALSE, + ), + 'exclude' => 1, + 'id' => 'field_book_page_count_value', + 'table' => 'node_data_field_book_page_count', + 'field' => 'field_book_page_count_value', + 'relationship' => 'none', + ), + 'field_publisher_value' => array( + 'label' => '', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'link_to_node' => 0, + 'label_type' => 'none', + 'format' => 'default', + 'multiple' => array( + 'group' => TRUE, + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_reversed' => FALSE, + ), + 'exclude' => 1, + 'id' => 'field_publisher_value', + 'table' => 'node_data_field_publisher', + 'field' => 'field_publisher_value', + 'relationship' => 'none', + ), + 'nothing_1' => array( + 'label' => 'Published by', + 'alter' => array( + 'text' => '[field_publisher_value] on [field_book_listing_date_value] ([field_book_page_count_value] pages)', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'exclude' => 0, + 'id' => 'nothing_1', + 'table' => 'views', + 'field' => 'nothing', + 'relationship' => 'none', + ), + 'field_official_website_url' => array( + 'label' => '', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '[field_official_website_url]', + 'absolute' => 0, + 'link_class' => '', + 'alt' => 'This is a site created by the author specially for this book which may include errata, code, etc.', + 'rel' => 'nofollow', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 1, + 'empty_zero' => 0, + 'hide_alter_empty' => 1, + 'link_to_node' => 0, + 'label_type' => 'none', + 'format' => 'default', + 'multiple' => array( + 'group' => TRUE, + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_reversed' => FALSE, + ), + 'exclude' => 0, + 'id' => 'field_official_website_url', + 'table' => 'node_data_field_official_website', + 'field' => 'field_official_website_url', + 'relationship' => 'none', + ), + 'field_book_isbn_13_value' => array( + 'label' => 'ISBN', + 'alter' => array( + 'alter_text' => 0, + 'text' => 'ISBN: [field_book_isbn_13_value]', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 0, + 'ellipsis' => 0, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'link_to_node' => 0, + 'label_type' => 'custom', + 'format' => 'default', + 'multiple' => array( + 'group' => TRUE, + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_reversed' => FALSE, + ), + 'exclude' => 0, + 'id' => 'field_book_isbn_13_value', + 'table' => 'node_data_field_book_isbn_13', + 'field' => 'field_book_isbn_13_value', + 'relationship' => 'none', + ), + 'tid_5' => array( + 'label' => 'Availability', + 'alter' => array( + 'alter_text' => 0, + 'text' => '', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 1, + 'empty_zero' => 0, + 'hide_alter_empty' => 1, + 'type' => 'separator', + 'separator' => ', ', + 'link_to_taxonomy' => 0, + 'limit' => 1, + 'vids' => array( + 59 => 59, + 1 => 0, + 5 => 0, + 38 => 0, + 54 => 0, + 56 => 0, + 6 => 0, + 4 => 0, + 44 => 0, + 46 => 0, + 3 => 0, + 48 => 0, + 50 => 0, + 52 => 0, + 58 => 0, + 7 => 0, + 2 => 0, + 31 => 0, + 32 => 0, + 33 => 0, + 34 => 0, + 9 => 0, + ), + 'exclude' => 0, + 'id' => 'tid_5', + 'table' => 'term_node', + 'field' => 'tid', + 'relationship' => 'none', + ), + 'field_book_purchase_link_url' => array( + 'label' => '', + 'alter' => array( + 'alter_text' => 1, + 'text' => 'Order from [field_publisher_value]', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 1, + 'empty_zero' => 0, + 'hide_alter_empty' => 1, + 'link_to_node' => 0, + 'label_type' => 'none', + 'format' => 'plain', + 'multiple' => array( + 'group' => TRUE, + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_reversed' => FALSE, + ), + 'exclude' => 0, + 'id' => 'field_book_purchase_link_url', + 'table' => 'node_data_field_book_purchase_link', + 'field' => 'field_book_purchase_link_url', + 'relationship' => 'none', + ), + 'field_book_isbn_10_value' => array( + 'label' => '', + 'alter' => array( + 'alter_text' => 1, + 'text' => 'Order from Amazon.com', + 'make_link' => 0, + 'path' => '', + 'absolute' => 0, + 'link_class' => '', + 'alt' => '', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'link_to_node' => 0, + 'label_type' => 'none', + 'format' => 'default', + 'multiple' => array( + 'group' => TRUE, + 'multiple_number' => '', + 'multiple_from' => '', + 'multiple_reversed' => FALSE, + ), + 'exclude' => 0, + 'id' => 'field_book_isbn_10_value', + 'table' => 'node_data_field_book_isbn_10', + 'field' => 'field_book_isbn_10_value', + 'relationship' => 'none', + ), + 'nothing' => array( + 'label' => '', + 'alter' => array( + 'text' => 'More information', + 'make_link' => 1, + 'path' => 'node/[nid]', + 'absolute' => 0, + 'link_class' => 'clear-block', + 'alt' => 'View additional information about this book or leave a comment about it.', + 'rel' => '', + 'prefix' => '', + 'suffix' => '', + 'target' => '', + 'help' => '', + 'trim' => 0, + 'max_length' => '', + 'word_boundary' => 1, + 'ellipsis' => 1, + 'html' => 0, + 'strip_tags' => 0, + ), + 'empty' => '', + 'hide_empty' => 0, + 'empty_zero' => 0, + 'hide_alter_empty' => 0, + 'exclude' => 0, + 'id' => 'nothing', + 'table' => 'views', + 'field' => 'nothing', + 'relationship' => 'none', + ), + )); + $handler->override_option('sorts', array( + 'field_book_listing_date_value' => array( + 'order' => 'DESC', + 'delta' => -1, + 'id' => 'field_book_listing_date_value', + 'table' => 'node_data_field_book_listing_date', + 'field' => 'field_book_listing_date_value', + 'override' => array( + 'button' => 'Override', + ), + 'relationship' => 'none', + ), + )); + $handler->override_option('filters', array( + 'type' => array( + 'operator' => 'in', + 'value' => array( + 'book_listing' => 'book_listing', + ), + 'group' => '0', + 'exposed' => FALSE, + 'expose' => array( + 'operator' => FALSE, + 'label' => '', + ), + 'id' => 'type', + 'table' => 'node', + 'field' => 'type', + 'relationship' => 'none', + ), + 'status_extra' => array( + 'id' => 'status_extra', + 'table' => 'node', + 'field' => 'status_extra', + ), + 'tid' => array( + 'operator' => 'or', + 'value' => array( + 34512 => '34512', + ), + 'group' => '0', + 'exposed' => TRUE, + 'expose' => array( + 'use_operator' => 0, + 'operator' => 'tid_op', + 'identifier' => 'tid', + 'label' => 'Status', + 'optional' => 1, + 'single' => 0, + 'remember' => 0, + 'reduce' => 0, + ), + 'type' => 'select', + 'limit' => TRUE, + 'vid' => '59', + 'id' => 'tid', + 'table' => 'term_node', + 'field' => 'tid', + 'hierarchy' => 0, + 'override' => array( + 'button' => 'Override', + ), + 'relationship' => 'none', + 'reduce_duplicates' => 0, + ), + 'tid_1' => array( + 'operator' => 'or', + 'value' => array( + 102 => '102', + 120 => '120', + 20236 => '20236', + ), + 'group' => '0', + 'exposed' => TRUE, + 'expose' => array( + 'use_operator' => 0, + 'operator' => 'tid_1_op', + 'identifier' => 'tid_1', + 'label' => 'Drupal version', + 'optional' => 1, + 'single' => 0, + 'remember' => 0, + 'reduce' => 0, + ), + 'type' => 'select', + 'limit' => TRUE, + 'vid' => '5', + 'id' => 'tid_1', + 'table' => 'term_node', + 'field' => 'tid', + 'hierarchy' => 0, + 'override' => array( + 'button' => 'Override', + ), + 'relationship' => 'none', + 'reduce_duplicates' => 1, + ), + 'tid_2' => array( + 'operator' => 'or', + 'value' => array( + 1766 => '1766', + 1762 => '1762', + 1756 => '1756', + 1760 => '1760', + 34516 => '34516', + ), + 'group' => '0', + 'exposed' => TRUE, + 'expose' => array( + 'use_operator' => 0, + 'operator' => 'tid_2_op', + 'identifier' => 'tid_2', + 'label' => 'Audience', + 'optional' => 1, + 'single' => 0, + 'remember' => 0, + 'reduce' => 1, + ), + 'type' => 'select', + 'limit' => TRUE, + 'vid' => '38', + 'id' => 'tid_2', + 'table' => 'term_node', + 'field' => 'tid', + 'hierarchy' => 0, + 'relationship' => 'none', + 'reduce_duplicates' => 1, + ), + )); + $handler->override_option('access', array( + 'type' => 'none', + )); + $handler->override_option('cache', array( + 'type' => 'none', + )); + $handler->override_option('title', 'Books about Drupal'); + $handler->override_option('empty', 'No books currently listed match your filters. Try a less restrictive set of filters.'); + $handler->override_option('empty_format', '1'); + $handler->override_option('use_pager', '1'); + $handler->override_option('distinct', 1); + $handler->override_option('style_options', array( + 'grouping' => '', + )); + $handler = $view->new_display('page', 'Books page', 'page_1'); + $handler->override_option('path', 'books'); + $handler->override_option('menu', array( + 'type' => 'none', + 'title' => '', + 'description' => '', + 'weight' => 0, + 'name' => 'navigation', + )); + $handler->override_option('tab_options', array( + 'type' => 'none', + 'title' => '', + 'description' => '', + 'weight' => 0, + 'name' => 'navigation', + )); + + $views[$view->name] = $view; + + return $views; +}