Permalink
Browse files

All changes for alpha3 which includes a new view

  • Loading branch information...
1 parent 69ee05c commit cc4f5fa6d600a9d69a4835347521b4f08701eaab @bmann committed Jun 8, 2010
Showing with 425 additions and 6 deletions.
  1. +5 −5 silent_auction.defaults.inc
  2. +9 −0 silent_auction.features.inc
  3. +406 −0 silent_auction.features.views.inc
  4. +5 −1 silent_auction.info
View
10 silent_auction.defaults.inc
@@ -121,7 +121,7 @@ function _silent_auction_content_default_fields() {
'field_name' => 'field_photo',
'type_name' => 'silentauctionitem',
'display_settings' => array(
- 'weight' => '36',
+ 'weight' => '37',
'parent' => '',
'label' => array(
'format' => 'hidden',
@@ -131,7 +131,7 @@ function _silent_auction_content_default_fields() {
'exclude' => 0,
),
'full' => array(
- 'format' => 'display_imagelink',
+ 'format' => 'imagefield__lightbox2__display__original',
'exclude' => 0,
),
'4' => array(
@@ -180,7 +180,7 @@ function _silent_auction_content_default_fields() {
'field_name' => 'field_value',
'type_name' => 'silentauctionitem',
'display_settings' => array(
- 'weight' => '37',
+ 'weight' => '36',
'parent' => '',
'label' => array(
'format' => 'inline',
@@ -301,7 +301,7 @@ function _silent_auction_strongarm() {
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'comment_anonymous_silentauctionitem';
- $strongarm->value = 0;
+ $strongarm->value = '0';
$export['comment_anonymous_silentauctionitem'] = $strongarm;
$strongarm = new stdClass;
@@ -315,7 +315,7 @@ function _silent_auction_strongarm() {
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'comment_default_mode_silentauctionitem';
- $strongarm->value = '4';
+ $strongarm->value = '2';
$export['comment_default_mode_silentauctionitem'] = $strongarm;
$strongarm = new stdClass;
View
9 silent_auction.features.inc
@@ -44,3 +44,12 @@ function silent_auction_strongarm() {
$args = func_get_args();
return call_user_func_array('_silent_auction_strongarm', $args);
}
+
+/**
+ * Implementation of hook_views_default_views().
+ */
+function silent_auction_views_default_views() {
+ module_load_include('inc', 'silent_auction', 'silent_auction.features.views');
+ $args = func_get_args();
+ return call_user_func_array('_silent_auction_views_default_views', $args);
+}
View
406 silent_auction.features.views.inc
@@ -0,0 +1,406 @@
+<?php
+
+/**
+ * Helper to implementation of hook_views_default_views().
+ */
+function _silent_auction_views_default_views() {
+ $views = array();
+
+ // Exported view: silent_auction_bids
+ $view = new view;
+ $view->name = 'silent_auction_bids';
+ $view->description = '';
+ $view->tag = '';
+ $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', 'Default', 'default');
+ $handler->override_option('relationships', array(
+ 'nid' => array(
+ 'label' => 'Node',
+ 'required' => 1,
+ 'id' => 'nid',
+ 'table' => 'comments',
+ 'field' => 'nid',
+ 'relationship' => 'none',
+ ),
+ ));
+ $handler->override_option('fields', array(
+ 'title' => array(
+ 'label' => 'Auction Item',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ '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,
+ 'link_to_node' => 1,
+ 'exclude' => 0,
+ 'id' => 'title',
+ 'table' => 'node',
+ 'field' => 'title',
+ 'relationship' => 'nid',
+ ),
+ 'name' => array(
+ 'label' => 'Bidder',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ '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,
+ 'link_to_user' => 0,
+ 'exclude' => 0,
+ 'id' => 'name',
+ 'table' => 'comments',
+ 'field' => 'name',
+ 'relationship' => 'none',
+ ),
+ 'comment' => array(
+ 'label' => 'Bid',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ '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,
+ 'exclude' => 0,
+ 'id' => 'comment',
+ 'table' => 'comments',
+ 'field' => 'comment',
+ 'relationship' => 'none',
+ ),
+ 'timestamp' => array(
+ 'label' => 'Bid Time',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ '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,
+ 'date_format' => 'time ago',
+ 'custom_date_format' => '',
+ 'exclude' => 0,
+ 'id' => 'timestamp',
+ 'table' => 'comments',
+ 'field' => 'timestamp',
+ 'relationship' => 'none',
+ ),
+ 'comment_count' => array(
+ 'label' => 'No. of bids',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ '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,
+ 'set_precision' => FALSE,
+ 'precision' => 0,
+ 'decimal' => '.',
+ 'separator' => ',',
+ 'prefix' => '',
+ 'suffix' => '',
+ 'exclude' => 0,
+ 'id' => 'comment_count',
+ 'table' => 'node_comment_statistics',
+ 'field' => 'comment_count',
+ 'relationship' => 'nid',
+ ),
+ 'replyto_comment' => array(
+ 'label' => 'Add a new bid',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ '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,
+ 'text' => '',
+ 'exclude' => 0,
+ 'id' => 'replyto_comment',
+ 'table' => 'comments',
+ 'field' => 'replyto_comment',
+ 'relationship' => 'none',
+ ),
+ ));
+ $handler->override_option('sorts', array(
+ 'timestamp' => array(
+ 'order' => 'DESC',
+ 'granularity' => 'second',
+ 'id' => 'timestamp',
+ 'table' => 'comments',
+ 'field' => 'timestamp',
+ 'override' => array(
+ 'button' => 'Override',
+ ),
+ 'relationship' => 'none',
+ ),
+ ));
+ $handler->override_option('access', array(
+ 'type' => 'none',
+ ));
+ $handler->override_option('cache', array(
+ 'type' => 'none',
+ ));
+ $handler->override_option('title', 'Recent Bids');
+ $handler->override_option('items_per_page', 25);
+ $handler->override_option('use_pager', '1');
+ $handler->override_option('distinct', 0);
+ $handler->override_option('style_plugin', 'table');
+ $handler->override_option('row_plugin', 'comment');
+ $handler = $view->new_display('page', 'Page', 'page_1');
+ $handler->override_option('path', 'bids');
+ $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',
+ ));
+ $handler = $view->new_display('block', 'Block', 'block_1');
+ $handler->override_option('fields', array(
+ 'title' => array(
+ 'label' => 'Auction Item',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ '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,
+ 'link_to_node' => 1,
+ 'exclude' => 0,
+ 'id' => 'title',
+ 'table' => 'node',
+ 'field' => 'title',
+ 'relationship' => 'nid',
+ 'override' => array(
+ 'button' => 'Use default',
+ ),
+ ),
+ 'comment' => array(
+ 'label' => 'Last bid',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ '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,
+ 'exclude' => 0,
+ 'id' => 'comment',
+ 'table' => 'comments',
+ 'field' => 'comment',
+ 'relationship' => 'none',
+ 'override' => array(
+ 'button' => 'Use default',
+ ),
+ ),
+ 'comment_count' => array(
+ 'label' => 'No. of Bids',
+ 'alter' => array(
+ 'alter_text' => 0,
+ 'text' => '',
+ 'make_link' => 0,
+ 'path' => '',
+ 'link_class' => '',
+ 'alt' => '',
+ '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,
+ 'set_precision' => FALSE,
+ 'precision' => 0,
+ 'decimal' => '.',
+ 'separator' => ',',
+ 'prefix' => '',
+ 'suffix' => '',
+ 'exclude' => 0,
+ 'id' => 'comment_count',
+ 'table' => 'node_comment_statistics',
+ 'field' => 'comment_count',
+ 'relationship' => 'nid',
+ 'override' => array(
+ 'button' => 'Use default',
+ ),
+ ),
+ ));
+ $handler->override_option('items_per_page', 10);
+ $handler->override_option('use_pager', '0');
+ $handler->override_option('use_more', 1);
+ $handler->override_option('use_more_always', 1);
+ $handler->override_option('use_more_text', 'see all recent bids »');
+ $handler->override_option('style_options', array(
+ 'grouping' => '',
+ 'override' => 1,
+ 'sticky' => 0,
+ 'order' => 'desc',
+ 'columns' => array(
+ 'title' => 'title',
+ 'comment' => 'comment',
+ 'comment_count' => 'comment_count',
+ ),
+ 'info' => array(
+ 'title' => array(
+ 'sortable' => 0,
+ 'separator' => '',
+ ),
+ 'comment' => array(
+ 'separator' => '',
+ ),
+ 'comment_count' => array(
+ 'sortable' => 0,
+ 'separator' => '',
+ ),
+ ),
+ 'default' => '-1',
+ ));
+ $handler->override_option('row_plugin', 'fields');
+ $handler->override_option('row_options', array(
+ 'inline' => array(),
+ 'separator' => ' |',
+ 'hide_empty' => 0,
+ ));
+ $handler->override_option('block_description', '');
+ $handler->override_option('block_caching', -1);
+
+ $views[$view->name] = $view;
+
+ return $views;
+}
View
6 silent_auction.info
@@ -1,13 +1,16 @@
core = "6.x"
+dependencies[] = "comment"
dependencies[] = "features"
dependencies[] = "format_number"
dependencies[] = "formatted_number"
dependencies[] = "imagecache"
dependencies[] = "imagefield"
+dependencies[] = "lightbox2"
dependencies[] = "number"
dependencies[] = "stringoverrides"
dependencies[] = "strongarm"
dependencies[] = "text"
+dependencies[] = "views"
description = "Implements a silent auction using a custom content type and using comments for bids"
features[content][] = "silentauctionitem-field_donatedby"
features[content][] = "silentauctionitem-field_itemnumber"
@@ -31,7 +34,8 @@ features[variable][] = "format_number_decimal_point"
features[variable][] = "format_number_thousands_sep"
features[variable][] = "format_number_user_configurable"
features[variable][] = "node_options_silentauctionitem"
+features[views][] = "silent_auction_bids"
name = "Silent Auction"
package = "Features"
project = "silent_auction"
-version = "6.x-1.0-alpha2"
+version = "6.x-1.0-alpha3"

0 comments on commit cc4f5fa

Please sign in to comment.