From 2c54467a60fba3d238b75d6957c7c6994e5881c6 Mon Sep 17 00:00:00 2001 From: Cynthia Mijares Date: Tue, 28 Jun 2016 14:43:28 -0700 Subject: [PATCH] JSLBRE-360: New image styles and view mode for large card --- stanford_image.ds.inc | 49 ++ stanford_image.features.field_instance.inc | 655 ++++++++++++++++++++- stanford_image.features.inc | 54 ++ stanford_image.field_group.inc | 99 ++++ stanford_image.info | 11 +- stanford_image.strongarm.inc | 12 + stanford_image.views_default.inc | 2 +- 7 files changed, 858 insertions(+), 24 deletions(-) diff --git a/stanford_image.ds.inc b/stanford_image.ds.inc index 405424d..80dfaa1 100644 --- a/stanford_image.ds.inc +++ b/stanford_image.ds.inc @@ -4,6 +4,45 @@ * stanford_image.ds.inc */ +/** + * Implements hook_ds_field_settings_info(). + */ +function stanford_image_ds_field_settings_info() { + $export = array(); + + $ds_fieldsetting = new stdClass(); + $ds_fieldsetting->api_version = 1; + $ds_fieldsetting->id = 'bean|stanford_postcard|stanford_large_card'; + $ds_fieldsetting->entity_type = 'bean'; + $ds_fieldsetting->bundle = 'stanford_postcard'; + $ds_fieldsetting->view_mode = 'stanford_large_card'; + $ds_fieldsetting->settings = array( + 'title_wrapper' => array( + 'weight' => '0', + 'label' => 'hidden', + 'format' => 'stanford_field_formatters', + 'formatter_settings' => array( + 'html_tag' => 'h2', + 'link_field' => '', + 'custom_link_to_entity' => 0, + 'custom_prefix' => '', + 'custom_suffix' => '', + 'custom_reverse' => 0, + 'custom_trim' => 0, + 'custom_strtolower' => 0, + 'custom_strtoupper' => 0, + 'custom_ucfirst' => 0, + 'custom_ucwords' => 0, + 'custom_strip_tags' => 0, + 'custom_strip_preserve' => '', + ), + ), + ); + $export['bean|stanford_postcard|stanford_large_card'] = $ds_fieldsetting; + + return $export; +} + /** * Implements hook_ds_view_modes_info(). */ @@ -180,6 +219,16 @@ function stanford_image_ds_view_modes_info() { ); $export['stanford_icon_square'] = $ds_view_mode; + $ds_view_mode = new stdClass(); + $ds_view_mode->api_version = 1; + $ds_view_mode->view_mode = 'stanford_large_card'; + $ds_view_mode->label = 'Large Card'; + $ds_view_mode->entities = array( + 'bean' => 'bean', + 'field_collection_item' => 'field_collection_item', + ); + $export['stanford_large_card'] = $ds_view_mode; + $ds_view_mode = new stdClass(); $ds_view_mode->api_version = 1; $ds_view_mode->view_mode = 'stanford_large_scaled'; diff --git a/stanford_image.features.field_instance.inc b/stanford_image.features.field_instance.inc index 9fef6ae..ee9e0b6 100644 --- a/stanford_image.features.field_instance.inc +++ b/stanford_image.features.field_instance.inc @@ -27,98 +27,266 @@ function stanford_image_field_default_field_instances() { 'stanford_3_col_header' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_4_col_header' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_6_col_banner' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 3, ), 'stanford_6_col_banner_short' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_6_col_banner_tall' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_6_col_photo_landscape' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 4, ), 'stanford_8_col_banner' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_8_col_banner_short' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 3, ), 'stanford_8_col_banner_tall' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_9_col_banner' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_9_col_banner_short' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_12_col_banner' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_12_col_banner_tall' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_banner_850x400' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), @@ -152,17 +320,47 @@ function stanford_image_field_default_field_instances() { 'type' => 'hidden', 'weight' => 2, ), + 'stanford_large_card' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 2, + ), 'stanford_large_scaled' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), 'stanford_large_square' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 8, ), @@ -275,14 +473,38 @@ function stanford_image_field_default_field_instances() { 'stanford_3_col_header' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 3, ), 'stanford_4_col_header' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 2, ), @@ -307,7 +529,19 @@ function stanford_image_field_default_field_instances() { 'stanford_6_col_photo_landscape' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 6, ), @@ -356,7 +590,19 @@ function stanford_image_field_default_field_instances() { 'stanford_banner_850x400' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 4, ), @@ -390,17 +636,47 @@ function stanford_image_field_default_field_instances() { 'type' => 'hidden', 'weight' => 4, ), + 'stanford_large_card' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 4, + ), 'stanford_large_scaled' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 4, ), 'stanford_large_square' => array( 'label' => 'hidden', 'module' => 'text', - 'settings' => array(), + 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', + ), 'type' => 'text_default', 'weight' => 9, ), @@ -507,6 +783,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'page-width', ), @@ -517,6 +804,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '3-col-header', ), @@ -527,6 +825,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '4-col-header', ), @@ -537,6 +846,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '6-col-banner', ), @@ -547,6 +867,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '6-col-banner-short', ), @@ -557,6 +888,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '6-col-banner-tall', ), @@ -567,6 +909,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '6-col-photo-landscape', ), @@ -577,6 +930,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '8-col-banner', ), @@ -587,6 +951,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '8-col-banner-short', ), @@ -597,6 +972,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '8-col-banner-tall', ), @@ -607,6 +993,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '9-col-banner', ), @@ -617,6 +1014,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '9-col-banner-short', ), @@ -627,6 +1035,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '12-col-banner', ), @@ -637,6 +1056,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => '12-col-banner-tall', ), @@ -647,6 +1077,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'banner-850x400', ), @@ -657,6 +1098,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'full-width-banner', ), @@ -688,6 +1140,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'icon-profile', ), @@ -698,6 +1161,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'icon-scaled', ), @@ -708,16 +1182,59 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'icon-square', ), 'type' => 'image', 'weight' => 1, ), + 'stanford_large_card' => array( + 'label' => 'hidden', + 'module' => 'image', + 'settings' => array( + 'custom_link_to_entity' => 0, + 'custom_prefix' => '', + 'custom_reverse' => 0, + 'custom_strip_preserve' => '', + 'custom_strip_tags' => 0, + 'custom_strtolower' => 0, + 'custom_strtoupper' => 0, + 'custom_suffix' => '', + 'custom_trim' => 0, + 'custom_ucfirst' => 0, + 'custom_ucwords' => 0, + 'image_link' => '', + 'image_style' => 'large-card', + ), + 'type' => 'image', + 'weight' => 1, + ), 'stanford_large_scaled' => array( 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'large-scaled', ), @@ -728,6 +1245,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'large-square', ), @@ -738,6 +1266,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'med-profile', ), @@ -748,6 +1287,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'med-square', ), @@ -758,6 +1308,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'sm-profile', ), @@ -768,6 +1329,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'sm-scaled', ), @@ -778,6 +1350,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'sm-square', ), @@ -788,6 +1371,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'thmb-square', ), @@ -798,6 +1392,17 @@ function stanford_image_field_default_field_instances() { 'label' => 'hidden', 'module' => 'image', 'settings' => array( + 'custom_link_to_entity' => '', + 'custom_prefix' => '', + 'custom_reverse' => '', + 'custom_strip_preserve' => '', + 'custom_strip_tags' => '', + 'custom_strtolower' => '', + 'custom_strtoupper' => '', + 'custom_suffix' => '', + 'custom_trim' => '', + 'custom_ucfirst' => '', + 'custom_ucwords' => '', 'image_link' => '', 'image_style' => 'med-profile', ), @@ -1004,6 +1609,12 @@ function stanford_image_field_default_field_instances() { 'type' => 'hidden', 'weight' => 3, ), + 'stanford_large_card' => array( + 'label' => 'above', + 'settings' => array(), + 'type' => 'hidden', + 'weight' => 3, + ), 'stanford_large_scaled' => array( 'label' => 'above', 'settings' => array(), diff --git a/stanford_image.features.inc b/stanford_image.features.inc index 1610f46..a94ab34 100644 --- a/stanford_image.features.inc +++ b/stanford_image.features.inc @@ -25,3 +25,57 @@ function stanford_image_ctools_plugin_api($module = NULL, $api = NULL) { function stanford_image_views_api($module = NULL, $api = NULL) { return array("api" => "3.0"); } + +/** + * Implements hook_image_default_styles(). + */ +function stanford_image_image_default_styles() { + $styles = array(); + + // Exported image style: button-card. + $styles['button-card'] = array( + 'label' => 'button-card', + 'effects' => array( + 2 => array( + 'name' => 'image_scale_and_crop', + 'data' => array( + 'width' => 270, + 'height' => 151, + ), + 'weight' => 1, + ), + ), + ); + + // Exported image style: large-card. + $styles['large-card'] = array( + 'label' => 'large-card', + 'effects' => array( + 1 => array( + 'name' => 'image_scale_and_crop', + 'data' => array( + 'width' => 370, + 'height' => 207, + ), + 'weight' => 1, + ), + ), + ); + + // Exported image style: small-card. + $styles['small-card'] = array( + 'label' => 'small-card', + 'effects' => array( + 3 => array( + 'name' => 'image_scale_and_crop', + 'data' => array( + 'width' => 270, + 'height' => 151, + ), + 'weight' => 1, + ), + ), + ); + + return $styles; +} diff --git a/stanford_image.field_group.inc b/stanford_image.field_group.inc index 85002d4..c08fd2b 100644 --- a/stanford_image.field_group.inc +++ b/stanford_image.field_group.inc @@ -41,6 +41,40 @@ function stanford_image_field_group_info() { ); $export['group_caption_div|field_collection_item|field_s_image_info|stanford_large_scaled'] = $field_group; + $field_group = new stdClass(); + $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */ + $field_group->api_version = 1; + $field_group->identifier = 'group_contained_styles|bean|stanford_postcard|stanford_large_card'; + $field_group->group_name = 'group_contained_styles'; + $field_group->entity_type = 'bean'; + $field_group->bundle = 'stanford_postcard'; + $field_group->mode = 'stanford_large_card'; + $field_group->parent_name = 'group_large_card_styles'; + $field_group->data = array( + 'label' => 'Contained Styles', + 'weight' => '5', + 'children' => array( + 0 => 'field_s_postcard_body', + 1 => 'title_wrapper', + 2 => 'group_more_link_style', + ), + 'format_type' => 'div', + 'format_settings' => array( + 'label' => 'Contained Styles', + 'instance_settings' => array( + 'id' => '', + 'classes' => 'contained', + 'description' => '', + 'show_label' => '0', + 'label_element' => 'h3', + 'effect' => 'none', + 'speed' => 'fast', + ), + 'formatter' => 'open', + ), + ); + $export['group_contained_styles|bean|stanford_postcard|stanford_large_card'] = $field_group; + $field_group = new stdClass(); $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */ $field_group->api_version = 1; @@ -105,6 +139,71 @@ function stanford_image_field_group_info() { ); $export['group_image_styles|field_collection_item|field_s_image_info|stanford_sm_scaled'] = $field_group; + $field_group = new stdClass(); + $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */ + $field_group->api_version = 1; + $field_group->identifier = 'group_large_card_styles|bean|stanford_postcard|stanford_large_card'; + $field_group->group_name = 'group_large_card_styles'; + $field_group->entity_type = 'bean'; + $field_group->bundle = 'stanford_postcard'; + $field_group->mode = 'stanford_large_card'; + $field_group->parent_name = ''; + $field_group->data = array( + 'label' => 'Large Card Styles', + 'weight' => '0', + 'children' => array( + 0 => 'field_s_image_info', + 1 => 'group_contained_styles', + ), + 'format_type' => 'div', + 'format_settings' => array( + 'label' => 'Large Card Styles', + 'instance_settings' => array( + 'id' => '', + 'classes' => '', + 'description' => '', + 'show_label' => '0', + 'label_element' => 'h3', + 'effect' => 'none', + 'speed' => 'fast', + ), + 'formatter' => 'open', + ), + ); + $export['group_large_card_styles|bean|stanford_postcard|stanford_large_card'] = $field_group; + + $field_group = new stdClass(); + $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */ + $field_group->api_version = 1; + $field_group->identifier = 'group_more_link_style|bean|stanford_postcard|stanford_large_card'; + $field_group->group_name = 'group_more_link_style'; + $field_group->entity_type = 'bean'; + $field_group->bundle = 'stanford_postcard'; + $field_group->mode = 'stanford_large_card'; + $field_group->parent_name = 'group_contained_styles'; + $field_group->data = array( + 'label' => 'More Link Styles', + 'weight' => '3', + 'children' => array( + 0 => 'field_s_postcard_link', + ), + 'format_type' => 'div', + 'format_settings' => array( + 'label' => 'More Link Styles', + 'instance_settings' => array( + 'id' => '', + 'classes' => 'more-link', + 'description' => '', + 'show_label' => '0', + 'label_element' => 'h3', + 'effect' => 'none', + 'speed' => 'fast', + ), + 'formatter' => 'open', + ), + ); + $export['group_more_link_style|bean|stanford_postcard|stanford_large_card'] = $field_group; + $field_group = new stdClass(); $field_group->disabled = FALSE; /* Edit this to true to make a default field_group disabled initially */ $field_group->api_version = 1; diff --git a/stanford_image.info b/stanford_image.info index f7cbbf7..47bca51 100644 --- a/stanford_image.info +++ b/stanford_image.info @@ -16,6 +16,7 @@ dependencies[] = list dependencies[] = number dependencies[] = options dependencies[] = stanford_image_styles +dependencies[] = stanford_person dependencies[] = strongarm dependencies[] = text dependencies[] = views @@ -24,6 +25,7 @@ features[ctools][] = ds:ds:1 features[ctools][] = field_group:field_group:1 features[ctools][] = strongarm:strongarm:1 features[ctools][] = views:views_default:3.0 +features[ds_field_settings][] = bean|stanford_postcard|stanford_large_card features[ds_view_modes][] = stanford_12_col_banner features[ds_view_modes][] = stanford_3_col_header features[ds_view_modes][] = stanford_4_col_header @@ -42,6 +44,7 @@ features[ds_view_modes][] = stanford_full_width_banner_short features[ds_view_modes][] = stanford_icon_profile features[ds_view_modes][] = stanford_icon_scaled features[ds_view_modes][] = stanford_icon_square +features[ds_view_modes][] = stanford_large_card features[ds_view_modes][] = stanford_large_scaled features[ds_view_modes][] = stanford_large_square features[ds_view_modes][] = stanford_medium_square @@ -56,8 +59,11 @@ features[field_base][] = field_s_image_image features[field_base][] = field_s_image_info features[field_base][] = field_s_image_source_info features[field_group][] = group_caption_div|field_collection_item|field_s_image_info|stanford_large_scaled +features[field_group][] = group_contained_styles|bean|stanford_postcard|stanford_large_card features[field_group][] = group_image_styles|field_collection_item|field_s_image_info|stanford_icon_scaled features[field_group][] = group_image_styles|field_collection_item|field_s_image_info|stanford_sm_scaled +features[field_group][] = group_large_card_styles|bean|stanford_postcard|stanford_large_card +features[field_group][] = group_more_link_style|bean|stanford_postcard|stanford_large_card features[field_group][] = group_s_banner_overlay|field_collection_item|field_s_image_info|stanford_12_col_banner features[field_group][] = group_s_banner_overlay|field_collection_item|field_s_image_info|stanford_12_col_banner_tall features[field_group][] = group_s_banner_overlay|field_collection_item|field_s_image_info|stanford_6_col_banner @@ -93,7 +99,10 @@ features[field_instance][] = field_collection_item-field_s_image_info-field_s_im features[field_instance][] = field_collection_item-field_s_image_info-field_s_image_credits features[field_instance][] = field_collection_item-field_s_image_info-field_s_image_image features[field_instance][] = field_collection_item-field_s_image_info-field_s_image_source_info +features[image][] = button-card +features[image][] = large-card +features[image][] = small-card features[variable][] = field_bundle_settings_field_collection_item__field_s_image_info features[views_view][] = stanford_bulk_fc_image_administration features[views_view][] = stanford_image_credits -project status url = https://github.com/SU-SWS/stanford_image +project status url = https://github.com/SU-LBRE/stanford_image diff --git a/stanford_image.strongarm.inc b/stanford_image.strongarm.inc index ae73c87..fe85b1b 100644 --- a/stanford_image.strongarm.inc +++ b/stanford_image.strongarm.inc @@ -178,6 +178,18 @@ function stanford_image_strongarm() { 'stanford_banner_850x400' => array( 'custom_settings' => TRUE, ), + 'stanford_large_card' => array( + 'custom_settings' => TRUE, + ), + 'gallery_large' => array( + 'custom_settings' => FALSE, + ), + 'gallery_medium' => array( + 'custom_settings' => FALSE, + ), + 'gallery_small' => array( + 'custom_settings' => FALSE, + ), ), 'extra_fields' => array( 'form' => array( diff --git a/stanford_image.views_default.inc b/stanford_image.views_default.inc index 1f9e51f..8e10b15 100644 --- a/stanford_image.views_default.inc +++ b/stanford_image.views_default.inc @@ -135,7 +135,7 @@ function stanford_image_views_default_views() { ), ); $handler->display->display_options['style_options']['sticky'] = TRUE; - /* Relationship: Field collection item: Entity with the Featured Image (field_s_image_info) */ + /* Relationship: Field collection item: Entity with the Image (field_s_image_info) */ $handler->display->display_options['relationships']['field_s_image_info_node']['id'] = 'field_s_image_info_node'; $handler->display->display_options['relationships']['field_s_image_info_node']['table'] = 'field_collection_item'; $handler->display->display_options['relationships']['field_s_image_info_node']['field'] = 'field_s_image_info_node';